Skip to content

Commit

Permalink
[#26] Interface 모듈 테스트 환경 구축
Browse files Browse the repository at this point in the history
  • Loading branch information
kdomo committed Jul 28, 2023
1 parent 7250c95 commit 20299c3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.todaysfail.config;
package com.todaysfail;

import org.springframework.test.context.ActiveProfilesResolver;

public class InterfaceIntegrateProfileResolver implements ActiveProfilesResolver {
@Override
public String[] resolve(Class<?> testClass) {
return new String[] {"domain", "infrastructure"};
return new String[] {"interface", "domain", "infrastructure"};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.todaysfail;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.boot.test.context.SpringBootTest;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@SpringBootTest(classes = InterfaceIntegrateTestConfig.class)
@Documented
public @interface InterfaceIntegrateSpringBootTest {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.todaysfail;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackageClasses = {TodaysFailApplication.class})
public class InterfaceIntegrateTestConfig {}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.todaysfail;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
@InterfaceIntegrateSpringBootTest
class TodaysFailApplicationTest {

@Test
Expand Down

0 comments on commit 20299c3

Please sign in to comment.