Пример #1
0
        public void Diff_LeftHasValueAndRightDont_ThrowsException()
        {
            var    left  = new Base64("dGVzdCBzdHJpbmc="); //test string
            Base64 right = null;

            var base64Duo = new Base64Duo(1, left, right);

            var errors = base64Duo.Diff();
        }
Пример #2
0
        public void Diff_TwoDifferentBase64InstanceWithDifferentUnderlyingString_RerturnsCorrectNumberOfErrors()
        {
            var left  = new Base64("dGVzdCBzdHJpbmc="); //test string
            var right = new Base64("VGVTdCBTdFJpTmc="); //TeSt StRiNg

            var base64Duo = new Base64Duo(1, left, right);

            var errors = base64Duo.Diff();

            Assert.AreEqual(5, errors.Count());
        }
Пример #3
0
        public void Diff_TwoDifferentBase64InstanceWithSameUnderlyingString_RerturnsZeroErrors()
        {
            var left  = new Base64("VGV4dCB0byBiZSBjb21wYXJlZA==");
            var right = new Base64("VGV4dCB0byBiZSBjb21wYXJlZA==");

            var base64Duo = new Base64Duo(1, left, right);

            var errors = base64Duo.Diff();

            Assert.AreEqual(0, errors.Count());
        }