@Override public void run() { while (!this.closed) { agent.tell(new TestRawThroughputCommand()); ++messageCount; } } }
public void testExecuteWhenMessage() throws Exception { System.out.println("testExecuteMessage()"); ActorAgent agent = actorRegistry.actorFor(TestAggregateActor.class); assertNotNull(agent); agent.tell(new TestMessage()); this.stayAlive(200); }
public void testExecuteCommand() throws Exception { System.out.println("testExecuteCommand()"); ActorAgent agent = actorRegistry.actorFor(TestActor.class); assertNotNull(agent); agent.tell(new TestCommand()); this.stayAlive(500); }
public void testExecuteEvent() throws Exception { System.out.println("testExecuteEvent()"); ActorAgent agent = actorRegistry.actorFor(TestActor.class); assertNotNull(agent); agent.tell(new TestEvent()); this.stayAlive(200); }
public void testExecuteMessage() throws Exception { System.out.println("testExecuteMessage()"); ActorAgent agent = actorRegistry.actorFor(TestActor.class); assertNotNull(agent); agent.tell(new TestMessage()); this.stayAlive(200); }
public void testExecuteWhenCommand() throws Exception { System.out.println("testExecuteCommand()"); ActorAgent agent = actorRegistry.actorFor(TestAggregateActor.class); assertNotNull(agent); agent.tell(new TestCommand()); this.stayAlive(100); }
public void testExecuteWhenEvent() throws Exception { System.out.println("testExecuteEvent()"); ActorAgent agent = actorRegistry.actorFor(TestAggregateActor.class); assertNotNull(agent); agent.tell(new TestEvent()); this.stayAlive(200); }
public void when(CommitTo aCommand) { this.sprint = aCommand.sprint(); ActorAgent sprint = this.registry().actorRegisteredAs(Sprint.class, this.sprint); sprint.tell(new BacklogItemCommitted(this.product, this.address(), this.sprint)); }
public Sprint(ActorInitializer anInitializer) { super(anInitializer.address(), anInitializer.registry()); this.begins = anInitializer.getParameter("begins"); this.committedBacklogItems = new HashSet<Address>(); this.ends = anInitializer.getParameter("ends"); this.goals = anInitializer.getParameter("goals"); this.name = anInitializer.getParameter("name"); ActorAgent product = anInitializer.getParameter("product"); this.product = product.address(); product.tell(new SprintScheduled(product.address(), this.self().address())); }
public void testProductPlanBacklogItem() throws Exception { ActorInitializer initializer = new ActorInitializer(this.actorRegistry); initializer.putParameter("name", "Test Product"); initializer.putParameter("description", "A decsription."); ActorAgent product = this.actorRegistry.actorFor(Product.class, initializer); product.tell(new PlanBacklogItem( "A summary of the backlog item.", "A story about the backlog item.")); this.stayAlive(); this.actorRegistry.expectedMessages(2); this.actorRegistry.expectedMessage(PlanBacklogItem.class); this.actorRegistry.expectedMessage(BacklogItemPlanned.class); }
public BacklogItem(ActorInitializer anInitializer) { super(anInitializer.address(), anInitializer.registry()); this.story = anInitializer.getParameter("story"); this.summary = anInitializer.getParameter("summary"); ActorAgent product = anInitializer.getParameter("product"); this.product = product.address(); product.tell(new BacklogItemPlanned(product.address(), this.self().address())); }
public void testProductScheduleSprint() throws Exception { ActorInitializer initializer = new ActorInitializer(this.actorRegistry); initializer.putParameter("name", "Test Product"); initializer.putParameter("description", "A decsription."); ActorAgent product = this.actorRegistry.actorFor(Product.class, initializer); product.tell(new ScheduleSprint( "Sprint 1", "The initial sprint.", this.daysFromNow(1), this.daysFromNow(15))); this.stayAlive(); this.actorRegistry.expectedMessages(2); this.actorRegistry.expectedMessage(ScheduleSprint.class); this.actorRegistry.expectedMessage(SprintScheduled.class); }