public void ShouldReadAllKeyValues() { // Arrange LocalizationRepository repository = new LocalizationRepository(ConfigSettings.LocalizationDatabaseConnectionName); LocalizationCollectionEntity localizationCollection = LocalizationDataProvider.PreInsertArrange(repository); string key = localizationCollection.LocalizationItems[0].Key; // Act LocalizationKeyCollectionEntity keyValueSetToAssert = repository.ReadAllKeyValues(key); // Assert Assert.IsNotNull(keyValueSetToAssert); }
public void ShouldCreateAllKeyValues() { // Arrange LocalizationRepository repository = new LocalizationRepository(ConfigSettings.LocalizationDatabaseConnectionName); LocalizationDataProvider.PreInsertArrange(repository); LocalizationKeyCollectionEntity keyValueSetToCreate = LocalizationDataProvider.GetLocalizationKeyCollectionToCreate(); // Act repository.CreateAllKeyValues(keyValueSetToCreate, false); // Assert LocalizationKeyCollectionEntity entityToAssert = repository.ReadAllKeyValues(keyValueSetToCreate.Key); Assert.IsNotNull(entityToAssert); }
public void ShouldUpdateAllKeyValues() { // Arrange LocalizationRepository repository = new LocalizationRepository(ConfigSettings.LocalizationDatabaseConnectionName); LocalizationDataProvider.PreInsertArrange(repository); LocalizationKeyCollectionEntity created = LocalizationDataProvider.GetLocalizationKeyCollectionToCreate(); created = repository.CreateAllKeyValues(created, false); created.KeyValues[0].Description += " Changed"; // Act LocalizationKeyCollectionEntity keyValueSetToAssert = repository.UpdateAllKeyValues(created, false); // Assert LocalizationKeyCollectionEntity entityToAssert = repository.ReadAllKeyValues(created.Key); Assert.IsNotNull(entityToAssert); }