private void WhenAddingASingleAccountToADataStore_ItShouldBeAdded(CiphertextDatastoreBase ciphertextDatastore, int expectedCount) { // Given var fakeCiphertextDto = CiphertextFakeDataGenerator.GetFakeCiphertextDtoNotYetAdded(); // When ciphertextDatastore.Save(fakeCiphertextDto); // Then ciphertextDatastore.GetAllIds() .Should().HaveCount(expectedCount); ciphertextDatastore.GetAll(CiphertextStatus.Any) .Should().HaveCount(expectedCount); ciphertextDatastore.GetAll(CiphertextStatus.Active) .Should().HaveCount(expectedCount); ciphertextDatastore.GetAll(CiphertextStatus.Deleted) .Should().HaveCount(0); VerifyThatStoredDataMatches(ciphertextDatastore, fakeCiphertextDto); }
public static void Populate(CiphertextDatastoreBase jsonCiphertextDatastore) { jsonCiphertextDatastore.Save(GetFakeCiphertextDto1()); jsonCiphertextDatastore.Save(GetFakeCiphertextDto2()); }