Example #1
0
        public void CompressesStartCapped()
        {
            // Arrange...

            var inputString = "baaaaa";
            var expectedCompressedLength = 5;

            // Act...
            var result = DymeCompressionDropIns.Compress(inputString);

            // Assert...
            Assert.AreEqual(expectedCompressedLength, result.Length);
        }
Example #2
0
        public void Decompresses2KindsCappedOnEitherSideAndMiddle()
        {
            // Arrange...

            var inputString = "caaaaacbbbbbc";

            // Act...
            var compressedString = DymeCompressionDropIns.Compress(inputString);
            var result           = DymeCompressionDropIns.Decompress(compressedString);

            // Assert...
            Assert.AreEqual(inputString, result);
        }
Example #3
0
        public void DoesNotCompress0()
        {
            // Arrange...

            var inputString = "";
            var expectedCompressedLength = 0;

            // Act...
            var result = DymeCompressionDropIns.Compress(inputString);

            // Assert...
            Assert.AreEqual(expectedCompressedLength, result.Length);
        }
Example #4
0
        public void Decompresses2Kinds()
        {
            // Arrange...

            var inputString = "aaaaabbbbb";

            // Act...
            var compressedString = DymeCompressionDropIns.Compress(inputString);
            var result           = DymeCompressionDropIns.Decompress(compressedString);

            // Assert...
            Assert.AreEqual(inputString, result);
        }
Example #5
0
        public void DecompressesStartsAndEndsCapped()
        {
            // Arrange...

            var inputString = "baaaaab";

            // Act...
            var compressedString = DymeCompressionDropIns.Compress(inputString);
            var result           = DymeCompressionDropIns.Decompress(compressedString);

            // Assert...
            Assert.AreEqual(inputString, result);
        }
Example #6
0
        public void DoesNotDecompress0()
        {
            // Arrange...

            var inputString = "";

            // Act...
            var compressedString = DymeCompressionDropIns.Compress(inputString);
            var result           = DymeCompressionDropIns.Decompress(compressedString);

            // Assert...
            Assert.AreEqual(inputString, result);
        }
Example #7
0
        public void Compresses2KindsCappedOnEitherSideAndMiddle()
        {
            // Arrange...

            var inputString = "caaaaacbbbbbc";
            var expectedCompressedLength = 11;

            // Act...
            var result = DymeCompressionDropIns.Compress(inputString);

            // Assert...
            Assert.AreEqual(expectedCompressedLength, result.Length);
        }
Example #8
0
        public void Compresses2Kinds()
        {
            // Arrange...

            var inputString = "aaaaabbbbb";
            var expectedCompressedLength = 8;

            // Act...
            var result = DymeCompressionDropIns.Compress(inputString);

            // Assert...
            Assert.AreEqual(expectedCompressedLength, result.Length);
        }