public Initializer(ISecurityGateway securityGateway, IRepositoryFactory repositoryFactory) { UserUseCaseFactory = new UserUseCaseFactory(securityGateway, repositoryFactory); ProjectUseCaseFactory = new ProjectUseCaseFactory(securityGateway, repositoryFactory); RequirementUseCaseFactory = new RequirementUseCaseFactory(securityGateway, repositoryFactory); UseCaseUseCaseFactory = new UseCaseUseCaseFactory(securityGateway, repositoryFactory); }
public ApplicationLogicRoot(IPersistence persistence) { var noSqlPersistence = persistence; IUserLookup lookup = new UserLookup(noSqlPersistence); IConnectorDestination destination = new UserDestination(noSqlPersistence); _userUseCaseFactory = new UserUseCaseFactory(destination, lookup); }
public void ShouldCreateConnectCommandWithIdsAndConnectionInProgress() { //GIVEN var repository = Any.Instance <IUserLookup>(); var destination = Any.Instance <IConnectorDestination>(); var factory = new UserUseCaseFactory(destination, repository); var connectionInProgress = Any.Instance <IConnectionInProgress>(); var user1Id = Any.String(); var user2Id = Any.String(); //WHEN var command = factory.CreateConnectionUseCase(user1Id, user2Id, connectionInProgress); //THEN command.Should().BeOfType <ConnectionUseCase>() .And.DependOn(repository) .And.DependOn(destination) .And.DependOn(user1Id) .And.DependOn(user2Id) .And.DependOn(connectionInProgress); }