public void TestReassembleWithDataSetExample3() { List <string> stringFragmentsTest = new List <string>(new string[] { "Go Bucks", "Beat Michigan" }); // Go Bucks Beat Michigan string expectedFinalMergedString = "Go BucksBeat Michigan"; // Step 1 - intializes the String Fragments //Create and object of Reassemble (this intializes the String Fragments) Reassemble reassemble = new Reassemble(); reassemble.StringFragments = stringFragmentsTest; // Continue until you have only one item in collection while (reassemble.StringFragments.Count != 1) { //Step 2. Find the Longest Overlap in string fragments reassemble.FindLongestOverlap(); //Step 3. Merge the found frangments with largest overlap and Contiue the process. reassemble.MergeTheOverLapFragments(); // - Refresh the Counter for Next round reassemble.RefreshCountersForNextRound(); } Assert.AreEqual(expectedFinalMergedString, reassemble.StringFragments[0]); reassemble.Dispose(); }
public void NullStringTest() { // Step 1 - intializes the String Fragments //Create and object of Reassemble (this intializes the String Fragments) Reassemble reassemble = new Reassemble(); reassemble.StringFragments = null; // Only one or no string fragment present - Return as it is. if (!reassemble.isValidMinimumCount()) { Assert.AreEqual(null, reassemble.StringFragments); } reassemble.Dispose(); }