public void Contains_file3_False() { var collection = new CustomWordListCollection(); collection.Add("file1.txt"); collection.Add("file2.txt"); Assert.IsFalse(collection.Contains("file3.txt")); }
public void CopyTo_DestinationOverflow_ExceptionThrown() { var collection = new CustomWordListCollection(); collection.Add("file1.txt"); collection.Add("file2.txt"); string[] array = new string[1]; collection.CopyTo(array, 0); }
public void Clear_SelfBuilt_ResetsToEmpty() { CustomWordListCollection collection = new CustomWordListCollection(); Assert.AreEqual(0, collection.Count); collection.Add("File1.txt"); collection.Add("File2.txt"); Assert.AreEqual(2, collection.Count); collection.Clear(); Assert.AreEqual(0, collection.Count); }
public void Remove_SelfBuilt_ItemIsRemoved() { CustomWordListCollection collection = new CustomWordListCollection(); collection.Add("file1.txt"); collection.Add("file2.txt"); Assert.AreEqual(2, collection.Count); bool result = collection.Remove("file1.txt"); Assert.IsTrue(result); Assert.AreEqual(1, collection.Count); }
public void Remove_SelfBuiltRemoveNonExistantItem_RemoveReturnsFalse() { CustomWordListCollection collection = new CustomWordListCollection(); collection.Add("file1.txt"); collection.Add("file2.txt"); Assert.AreEqual(2, collection.Count); bool result = collection.Remove("file3.txt"); Assert.IsFalse(result); Assert.AreEqual(2, collection.Count); }