@Test public void shouldReturnNamedParamRepositoryProducedFromStringAsNameAndRepository() { ParamRepository repository = mock(ParamRepository.class); NamedParamRepositoryFactory factory = new NamedParamRepositoryFactory(); NamedParamRepository namedRepository = factory.create("test", repository); assertThat(namedRepository).containsRepository(repository).hasName("test"); }
public NamedParamRepository create(RepositoryName repositoryName, ParamRepository repository) { return new NamedParamRepository(repositoryName, repository); }
NamedParamRepositoryFactory { public NamedParamRepository create(RepositoryName repositoryName, ParamRepository repository) { return new NamedParamRepository(repositoryName, repository); } }
NamedParamRepositoryFactory { public NamedParamRepository create(RepositoryName repositoryName, ParamRepository repository) { return new NamedParamRepository(repositoryName, repository); } NamedParamRepositoryFactory(); }
NamedParamRepositoryFactory { public NamedParamRepository create(RepositoryName repositoryName, ParamRepository repository) { return new NamedParamRepository(repositoryName, repository); } NamedParamRepositoryFactory(); NamedParamRepository create(RepositoryName repositoryName, ParamRepository repository); NamedParamRepository create(String repositoryName, ParamRepository repository); NamedParamRepository create(ParamRepository repository); }
NamedParamRepositoryFactory { public NamedParamRepository create(RepositoryName repositoryName, ParamRepository repository) { return new NamedParamRepository(repositoryName, repository); } NamedParamRepositoryFactory(); NamedParamRepository create(RepositoryName repositoryName, ParamRepository repository); NamedParamRepository create(String repositoryName, ParamRepository repository); NamedParamRepository create(ParamRepository repository);  }