Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

AKKA를 학습하기위해서는, 자신에게 맞는 유닛테스트 가능한 구조를 설계하는것이 중요합니다.

src : http://git.webnori.com/projects/WEBF/repos/spring_cachedb/browse/src/test/java/com/psmon/cachedb/git-CachedbApplicationTests.java

의존성이 없는 유니테스트 구성


Code Block
languagejava
themeEmacs
public class ActorBase {
   
   protected final Logger log = LoggerFactory.getLogger(this.getClass());
   
   public void runAll() {
      
   }
   
   protected ActorSystem system;
   protected SpringExtension ext;
   
   public ActorSystem getSystem() {
      return system;
   }
   public void setSystem(ActorSystem system) {
      this.system = system;
   }
   public SpringExtension getExt() {
      return ext;
   }
   public void setExt(SpringExtension ext) {
      this.ext = ext;
   }
}




Image Modified


Actor는 기본적으로 공통적으로 사용되는 ActorSystem 이 있으며, 외부로부터 설정이 가능해야합니다.

...