Skip to content

Commit c7b399e

Browse files
authored
unit test remove first node (#440)
1 parent e783286 commit c7b399e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

BitFaster.Caching.UnitTests/Lfu/LfuNodeListTests.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1-
using BitFaster.Caching.Lfu;
1+
using System;
2+
using BitFaster.Caching.Lfu;
23
using FluentAssertions;
34
using Xunit;
45

56
namespace BitFaster.Caching.UnitTests.Lfu
67
{
78
public class LfuNodeListTests
89
{
10+
#if DEBUG
11+
[Fact]
12+
public void WhenEmptyRemoveFirstThrows()
13+
{
14+
var list = new LfuNodeList<int, int>();
15+
Action remove = () => { list.RemoveFirst(); };
16+
remove.Should().Throw<InvalidOperationException>();
17+
}
18+
#endif
19+
920
[Fact]
1021
public void WhenPreviousNullLastReturnsNull()
1122
{

0 commit comments

Comments
 (0)