public void TestValidCharEnteredToDeleteAllMMoreThanTwoSame()//only A to Z is acceptable { try { LinkedListHelpers.Node node = new LinkedListHelpers.Node('Y'); node.deleteAllMMoreThanTwoSame('Y'); } catch (Exception ex) { Assert.Fail("No exception is expected since it is a valid char. " + ex); } }
public void TestAddingValidDeletingMoreThanThreeData()//checking if elements are deleted from the list successfully { ConsoleOutput consoleOutput = new ConsoleOutput(); LinkedListHelpers.Node node = new LinkedListHelpers.Node('E'); node.addNode('B');//data from the question node.addNode('E'); node.addNode('E'); node.addNode('B'); node.addNode('A'); node.addNode('B'); node.deleteAllMMoreThanTwoSame('E'); node.print(); //target.WriteToConsole(text); Assert.AreEqual("|E||->|B||->|E||->|B||->|A||->", consoleOutput.GetOuput().Trim()); }
public void TestInvalidCharEnteredToDeleteAllMMoreThanTwoSame1()//only A to Z is acceptable { LinkedListHelpers.Node node = new LinkedListHelpers.Node('A'); node.deleteAllMMoreThanTwoSame('0'); }
public void TestDeleteWithNEmptyChar()//empty input is not accepted { LinkedListHelpers.Node node = new LinkedListHelpers.Node('E'); node.deleteAllMMoreThanTwoSame('\0'); }
public void TestDeleteWithNull()//null input is not accepted { LinkedListHelpers.Node node = new LinkedListHelpers.Node('E'); node.deleteAllMMoreThanTwoSame(default(Char)); }