예제 #1
0
        public DatabaseInfoDto UpdateDatabaseNames(DatabaseInfoDto dto)
        {
            var dbEntity  = _repository.Get(dto.Hash);
            var converter = new DatabaseInfoDtoConverter();

            converter.Merge(dbEntity, dto);

            _persister.Save();

            return(converter.ToDto(dbEntity));
        }
예제 #2
0
        public IDatabaseInfoRepository CreateTestDatabaseRepositorySubstitute()
        {
            IDatabaseInfoRepository repository = Substitute.For <IDatabaseInfoRepository>();
            var testDatabase = TestDatabase;

            repository.GetAll().Returns(new List <DatabaseInfo> {
                testDatabase
            });
            repository.Get(testDatabase.Hash).Returns(testDatabase);

            return(repository);
        }
예제 #3
0
 public DatabaseInfoGroup GetDatabaseInfoGroup(string groupName)
 {
     return(_databaseInfoRepository.Get(x => x.Name == groupName));
 }