Hi,
Im new to Axon and Spring framework so bear with me, I have created a command handler which has a @AutoWired annotation in the command handler
public class BasketCommandHandler {
@Autowired
private Repository<Basket> repository;
// rest of class
}
How would I inject the @Autowired property when I want to test my command handler, my current unit test is as follows:
public class BasketCommandHandlerTest {
private FixtureConfiguration fixture;
@Before
public void setUp() {
fixture = Fixtures.newGivenWhenThenFixture(Basket.class);
// fixture.getRepository() ? where do I inject this into my command handler?
BasketCommandHandler myCommandHandler = new BasketCommandHandler();
fixture.registerAnnotatedCommandHandler(myCommandHandler);
}
// test cases below
}
Thanks :-)