Exemplo n.º 1
0
        public void TestValue2()
        {
            var prop1  = Fake.Word;
            var prop2a = Fake.Word;
            var prop2b = Fake.Word;

            var input = new TestClass1
            {
                Prop1 = prop1,
                Prop2a = prop2a,
                Prop2b = prop2b// + "s"
            };

            var expctd = new TestClass1D7
            {
                type = "testclass1",
                field_prop1 = und.Values(prop1),
                field_prop2 = und.Value1_2(prop2a, prop2b)
            };

            var actual = D7FieldMapper.Map(input) as TestClass1D7;

            var expctdStr = Json.Write(expctd, true);
            var actualStr = Json.Write(actual, true);

            actualStr.MustBe(expctdStr);
        }
Exemplo n.º 2
0
        public void TestValue2()
        {
            var prop1  = Fake.Word;
            var prop2a = Fake.Word;
            var prop2b = Fake.Word;

            var input = new TestClass1
            {
                Prop1  = prop1,
                Prop2a = prop2a,
                Prop2b = prop2b// + "s"
            };

            var expctd = new TestClass1D7
            {
                type        = "testclass1",
                field_prop1 = und.Values(prop1),
                field_prop2 = und.Value1_2(prop2a, prop2b)
            };

            var actual = D7FieldMapper.Map(input) as TestClass1D7;

            var expctdStr = Json.Write(expctd, true);
            var actualStr = Json.Write(actual, true);

            actualStr.MustBe(expctdStr);
        }