public void InsertShouldReturnTrueGivenValidInsert([Frozen] RegsSettings _, [Frozen] IOptionsMonitor <RegsSettings> __, string keyValue, string entryValue, RegsDatabaseManager sut) { // Arrange var key = new RegsKey(keyValue, RegsDataType.String); var insertValue = new RegsStringEntry(entryValue); // Act var wasInserted = sut.Insert(0, key, insertValue); // Assert wasInserted.ShouldBeTrue(); }
public void GetShouldReturnExpectedGivenValidInsert([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 var wasInserted = sut.Insert(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(); }