public void GetShouldReturnExpectedGivenValidUpsert([Frozen] RegsSettings _, [Frozen] IOptionsMonitor <RegsSettings> __, string keyValue, string entryValue, RegsDatabaseManager sut) { // Arrange var key = new RegsKey(keyValue, RegsDataType.String); var expected = new RegsStringEntry(entryValue); // Act sut.Upsert(0, key, expected); var actual = sut.Get(0, key); // Assert actual.ShouldBe(expected); }
public void GetShouldReturnNullGivenValidDelete([Frozen] RegsSettings _, [Frozen] IOptionsMonitor <RegsSettings> __, string keyValue, string deleteValue, RegsDatabaseManager sut) { // Arrange var key = new RegsKey(keyValue, RegsDataType.String); var toBeDeleted = new RegsStringEntry(deleteValue); sut.Insert(0, key, toBeDeleted); // Act sut.Delete(0, key); var actual = sut.Get(0, key); // Assert actual.ShouldBeNull(); }