public void ListWithSomeItemsAddedAndRemovedShouldNotHaveContainedOthers(string extra, params string[] items) { var sut = new MemoryList <string>(); sut.AddRange(items); sut.Remove(items[0]); Assert.False(sut.HasEverContained(extra)); }
public void RemovedItemsShouldNotBeContained() { var list = new MemoryList <int>(); list.Add(5); list.Remove(5); Assert.True(list.Contains(5)); }
public void ListCanRemove() { var list = new MemoryList <int>(); list.Add(7); list.Remove(7); Assert.False(list.Contains(7)); }
public void RemoveShouldTakeOutVariableIfAvailable(int value) { var memoryList = new MemoryList <int>(); memoryList.Add(5); memoryList.Add(1000); memoryList.Add(80); memoryList.Remove(value); Assert.DoesNotContain(value, memoryList); }
public void OneItemAddedAndRemovedShouldHaveBeenContained(string item) { var sut = new MemoryList <string>(); sut.Add(item); sut.Remove(item); var contained = sut.HasEverContained(item); Assert.True(contained); }
public void RemoveShouldRemoveSingleItem(int value) { //arrange, act, assert var list = new MemoryList <int>(); list.Add(value); list.Remove(value); Assert.False(list.Contains(value)); }
public void HasContainedShouldBeTrueForHasContainedAndRemoved() { var list = new MemoryList <int>(); list.Add(9); list.Remove(9); var result = list.HasContained(9); Assert.True(result); }
public void ContainsShouldBeFalseForNotContained() { var list = new MemoryList <int>(); list.Add(7); list.Remove(7); var result = list.Contains(7); Assert.False(result); }
[InlineData(-6)] //should return true public void ShouldReturnTrueIfValueWasEverIncluded(int value) { var memoryList = new MemoryList <int>(); memoryList.Add(6); memoryList.Add(-6); memoryList.Remove(-6); var result = memoryList.HasEverContained(value); Assert.True(result); }
public void RemoveShouldNotThrowException() { var Memory = new MemoryList(); Memory.Add("blah"); Memory.Remove(); var result = Memory.Contains("blah"); Assert.False(result); }
public void RemoveShouldRemoveVariable(int value) { // arrange var memoryList = new MemoryList <int>(); //act memoryList.Add(-5); memoryList.Add(10); memoryList.Add(10000); memoryList.Remove(value); // assert Assert.False(memoryList.Contains(value)); }
public void ContainsShouldBeTrueIfValueEverContained(int value) { // arrange var memoryList = new MemoryList <int>(); //act memoryList.Add(-5); memoryList.Add(10); memoryList.Remove(10); // assert Assert.True(memoryList.HasEverContained(value)); // act var result = memoryList.Contains(value); // assert Assert.False(memoryList.Contains(value)); }