public UnitTest2() { CommandResultReposiotry commandResultReposiotry = new CommandResultReposiotry(); CustomerRepository customerRepository = new CustomerRepository(); CustomerCommandHandler customerCommandHandler = new CustomerCommandHandler(customerRepository, commandResultReposiotry); CommandResultQueryaHandler commandResultQueryaHandler = new CommandResultQueryaHandler(commandResultReposiotry); CommandBus commandBus = new CommandBus(); commandBus.Registerd<CustomerCreateCommand>(customerCommandHandler); QueryBus queryBus = new QueryBus(); queryBus.Registerd<CommandResultQuery>(commandResultQueryaHandler); _commandBus = commandBus; _queryBus = queryBus; }