Example #1
0
        public void CompressSimple1StandardCompleteTest4Empty()
        {
            var input    = new List <int>();
            var expected = new List <int>();
            var actual   = CompressSimple1StandardComplete.CompressSimple(input);

            CollectionAssert.AreEqual(actual, expected);
        }
Example #2
0
        public void CompressSimple1StandardCompleteTest3Mutliple()
        {
            var input = new List <int> {
                10, 10, 10, 10, 20, 20, 30, 15, 15, 15
            };
            var expected = new List <int> {
                4, 10, 2, 20, 1, 30, 3, 15
            };
            var actual = CompressSimple1StandardComplete.CompressSimple(input);

            CollectionAssert.AreEqual(actual, expected);
        }
Example #3
0
        public void CompressSimple1StandardCompleteTest2SingleAtEnd()
        {
            var input = new List <int> {
                10, 10, 15, 20
            };
            var expected = new List <int> {
                2, 10, 1, 15, 1, 20
            };
            var actual = CompressSimple1StandardComplete.CompressSimple(input);

            CollectionAssert.AreEqual(actual, expected);
        }
Example #4
0
 public void CompressSimple1StandardCompleteTest5ErrorNull()
 {
     try
     {
         CompressSimple1StandardComplete.CompressSimple(null);
     }
     catch (ArgumentException)
     {
         Assert.IsTrue(true);
         return;
     }
     Assert.Fail();
 }