public void TestFindLine() { SandwichCode sandwich = new SandwichCode(); string line = sandwich.FindLine("example_file.txt"); Assert.AreEqual(string.Empty, line); }
public void TestCountLines_UsingLambda() { SandwichCode sandwich = new SandwichCode(); int count = sandwich.CountLines_UsingLambda("example_file.txt"); Assert.AreEqual(0, count); }
public void TestFindLine_UsingLambda() { SandwichCode sandwich = new SandwichCode(); string line = null; sandwich.FileByLineReader("example_file.txt", (s) => { bool found = s.Contains("e"); if (found) { line = s; return(false); } return(true); }); Assert.AreEqual(string.Empty, line); }