public void SmokeTest() { var toSort = new string[] { "atari", "apple", "facebook", "google", "walmart", "amazon", "netflix", "microsoft", "linkedin", }; Msd.Sort(toSort); Assert.AreEqual("amazon", toSort[0]); Assert.AreEqual("apple", toSort[1]); Assert.AreEqual("atari", toSort[2]); Assert.AreEqual("facebook", toSort[3]); Assert.AreEqual("google", toSort[4]); Assert.AreEqual("linkedin", toSort[5]); Assert.AreEqual("microsoft", toSort[6]); Assert.AreEqual("netflix", toSort[7]); Assert.AreEqual("walmart", toSort[8]); }
public void MsdSortTest() { var a = new string[] { "she", "sells", "seashells", "by", "the", "seashore", "the", "shells", "she", "sells", "are", "surely", "seashells", }; var b = new string[] { "are", "by", "seashells", "seashells", "seashore", "sells", "sells", "she", "she", "shells", "surely", "the", "the", }; Msd.Sort(a); for (int i = 0; i < a.Length; i++) { Assert.Equal(a[i], b[i]); } }
public void BaselineDifferentLength() { var sut = new Msd(); var input = new[] { "she", "sells", "seashells", "by", "the", "sea", "shore", "the", "shells", "she", "sells", "are", "surely", "seashells" }; Assert.Collection(sut.Sort(input), arg => Assert.Equal("are", arg), arg => Assert.Equal("by", arg), arg => Assert.Equal("sea", arg), arg => Assert.Equal("seashells", arg), arg => Assert.Equal("seashells", arg), arg => Assert.Equal("sells", arg), arg => Assert.Equal("sells", arg), arg => Assert.Equal("she", arg), arg => Assert.Equal("she", arg), arg => Assert.Equal("shells", arg), arg => Assert.Equal("shore", arg), arg => Assert.Equal("surely", arg), arg => Assert.Equal("the", arg), arg => Assert.Equal("the", arg)); }
public void BaselineSameLength() { var sut = new Msd(); var input = new[] { "4PGC938", "2IYE230", "3CIO720", "1ICK750", "1OHV845", "4JZY524", "1ICK750", "3CIO720", "1OHV845", "1OHV845", "2RLA629", "2RLA629", "3ATW723" }; Assert.Collection(sut.Sort(input), arg => Assert.Equal("1ICK750", arg), arg => Assert.Equal("1ICK750", arg), arg => Assert.Equal("1OHV845", arg), arg => Assert.Equal("1OHV845", arg), arg => Assert.Equal("1OHV845", arg), arg => Assert.Equal("2IYE230", arg), arg => Assert.Equal("2RLA629", arg), arg => Assert.Equal("2RLA629", arg), arg => Assert.Equal("3ATW723", arg), arg => Assert.Equal("3CIO720", arg), arg => Assert.Equal("3CIO720", arg), arg => Assert.Equal("4JZY524", arg), arg => Assert.Equal("4PGC938", arg)); }
public void TestLoad() { var msd = Msd.ParseMsd(TestData.StepFile); Equal("Goin' Under", msd[0]["TITLE"]); }