Ejemplo n.º 1
0
        public void RecursiveNestedJson_ReturnsTrue()
        {
            var expected = @"{ Key: ""Value"", Key2: { NestedKey1: ""NestedValue1""}}";
            var actual   = @"{ Key: ""Value"", Key2: { NestedKey1: ""NestedValue1"", NestedKey2: {NestedNestedKey: ""NestedNestedValue""}} }";

            var result = StringComparator.Compare(expected, actual);

            Assert.True(result);
        }
        public void NullString_ReturnsTrue()
        {
            string expected = null;
            string actual   = null;

            var result = StringComparator.Compare(expected, actual);

            Assert.True(result);
        }
Ejemplo n.º 3
0
        public void PartialExpectedJsonComparison_ReturnsTrue()
        {
            var expected = @"{ Key: ""Value"" }";
            var actual   = @"{ Key: ""Value"", Key2: ""Value2"" }";

            var result = StringComparator.Compare(expected, actual);

            Assert.True(result);
        }
        public void EmptyString_ReturnsTrue()
        {
            var expected = "";
            var actual   = "";

            var result = StringComparator.Compare(expected, actual);

            Assert.True(result);
        }
        public void SimpleJson_ReturnsTrue()
        {
            var expected = @"{ Key: ""Value"" }";
            var actual   = @"{ Key: ""Value"" }";

            var result = StringComparator.Compare(expected, actual);

            Assert.True(result);
        }
        public void TwoDifferentStrings_ReturnFalse()
        {
            var expected = "string";
            var actual   = "not same string";

            var result = StringComparator.Compare(expected, actual);

            Assert.False(result);
        }
        public void CaseInsensitive_ReturnTrue()
        {
            var expected = "string";
            var actual   = "String";

            var result = StringComparator.Compare(expected, actual);

            Assert.True(result);
        }
        public void TwoStrings_ReturnTrue()
        {
            var expected = "string";
            var actual   = "string";

            var result = StringComparator.Compare(expected, actual);

            Assert.True(result);
        }
Ejemplo n.º 9
0
        public void FormattingIssues_StillReturnTrue(string expected, string actual)
        {
            var result = StringComparator.Compare(expected, actual);

            Assert.True(result);
        }