public void IsEmpty_WhenTheSameNumberOfItemsHaveBeenRemovedAsWereAdded_ShouldReturnTrue() { // Arrange var subject = new DepthFirstSearchFringe<TestState>(); subject.Add(new TestState()); subject.Add(new TestState()); subject.Add(new TestState()); subject.GetNext(); subject.GetNext(); subject.GetNext(); // Act var result = subject.IsEmpty(); // Assert Assert.True(result); }
public void IsEmpty_AfterMoreItemsHaveBeenAddedThanRemoved_ShouldReturnFalse() { // Arrange var subject = new DepthFirstSearchFringe<TestState>(); subject.Add(new TestState()); subject.Add(new TestState()); subject.Add(new TestState()); subject.GetNext(); subject.GetNext(); // Act var result = subject.IsEmpty(); // Assert Assert.False(result); }
public void IsEmpty_StraightAfterCreation_ShouldReturnTrue() { // Arrange var subject = new DepthFirstSearchFringe<TestState>(); // Act var result = subject.IsEmpty(); // Assert Assert.True(result); }