コード例 #1
0
        public void UtmeEncoder_Compress_No_Missing_Values_Correctly()
        {
            var original = new[] { "a", "b", "c", "d", "e" };

            var compressed = UtmeEncoder.Compress(original);

            CollectionAssert.AreEqual(original, compressed);
        }
コード例 #2
0
 public void UtmeEncoder_Compress_With_Null_Throws_ArgumentNullException()
 {
     UtmeEncoder.Compress(null);
 }
コード例 #3
0
 public void UtmeEncoder_Compress_With_Null_Throws_ArgumentNullException()
 {
     Assert.ThrowsException <ArgumentNullException>(() => UtmeEncoder.Compress(null));
 }
コード例 #4
0
        public void UtmeEncoder_Compress_All_Missing_Values_Correctly()
        {
            var compressed = UtmeEncoder.Compress(new[] { "", null, " " });

            CollectionAssert.AreEqual(new string[] { }, compressed);
        }
コード例 #5
0
        public void UtmeEncoder_Compress_Ending_Missing_Values_Correctly()
        {
            var compressed = UtmeEncoder.Compress(new[] { "a", "b", "", null, " " });

            CollectionAssert.AreEqual(new[] { "a", "b" }, compressed);
        }
コード例 #6
0
        public void UtmeEncoder_Compress_Starting_Missing_Values_Correctly()
        {
            var compressed = UtmeEncoder.Compress(new[] { "", null, " ", "d", "e" });

            CollectionAssert.AreEqual(new[] { "4!d", "e" }, compressed);
        }
コード例 #7
0
        public void UtmeEncoder_Compress_Middle_Missing_Values_Correctly()
        {
            var compressed = UtmeEncoder.Compress(new[] { "a", null, "c", "d", "", " ", "g" });

            CollectionAssert.AreEqual(new [] { "a", "3!c", "d", "7!g" }, compressed);
        }