Skip to content

Commit a6a0f2f

Browse files
committed
Added TryUpdate_ShouldReturnFalse_WhenKeyMissing
1 parent a6866d6 commit a6a0f2f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

TechnitiumLibrary.UnitTests/TechnitiumLibrary.ByteTree/ByteTreeTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,14 @@ public void TryUpdate_ShouldThrow_WhenNullKey()
202202
Assert.ThrowsExactly<ArgumentNullException>(() => tree.TryUpdate(null, "x", "y"));
203203
}
204204

205+
[TestMethod]
206+
public void TryUpdate_ShouldReturnFalse_WhenKeyMissing()
207+
{
208+
ByteTree<string> tree = new ByteTree<string>();
209+
Assert.IsFalse(tree.TryUpdate(Key(9), "x", "y"));
210+
}
211+
212+
205213
// ---------------------------
206214
// AddOrUpdate
207215
// ---------------------------

0 commit comments

Comments
 (0)