Fix audit findings for coverage, architecture checks, and XML docs
This commit is contained in:
@@ -11,6 +11,9 @@ public class CursorTests : IDisposable
|
||||
private readonly StorageEngine _storage;
|
||||
private readonly BTreeIndex _index;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CursorTests"/> class.
|
||||
/// </summary>
|
||||
public CursorTests()
|
||||
{
|
||||
_testFile = Path.Combine(Path.GetTempPath(), $"docdb_cursor_test_{Guid.NewGuid()}.db");
|
||||
@@ -34,6 +37,9 @@ public class CursorTests : IDisposable
|
||||
_storage.CommitTransaction(txnId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests move to first should position at first.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void MoveToFirst_ShouldPositionAtFirst()
|
||||
{
|
||||
@@ -42,6 +48,9 @@ public class CursorTests : IDisposable
|
||||
cursor.Current.Key.ShouldBe(IndexKey.Create(10));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests move to last should position at last.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void MoveToLast_ShouldPositionAtLast()
|
||||
{
|
||||
@@ -50,6 +59,9 @@ public class CursorTests : IDisposable
|
||||
cursor.Current.Key.ShouldBe(IndexKey.Create(30));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests move next should traverse forward.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void MoveNext_ShouldTraverseForward()
|
||||
{
|
||||
@@ -65,6 +77,9 @@ public class CursorTests : IDisposable
|
||||
cursor.MoveNext().ShouldBeFalse(); // End
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests move prev should traverse backward.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void MovePrev_ShouldTraverseBackward()
|
||||
{
|
||||
@@ -80,6 +95,9 @@ public class CursorTests : IDisposable
|
||||
cursor.MovePrev().ShouldBeFalse(); // Start
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests seek should position exact or next.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Seek_ShouldPositionExact_OrNext()
|
||||
{
|
||||
@@ -99,6 +117,9 @@ public class CursorTests : IDisposable
|
||||
Should.Throw<InvalidOperationException>(() => cursor.Current);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disposes the resources used by this instance.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
_storage.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user