public void SimpleDecodeTest()
        {
            const string json = "{\"data\":{\"indexed1\":\"test1\",\"indexed2\":\"test2\"}}";

            IsolationUtils.FakeAttributeClient <ReferenceModel>(SimpleDecodeTest_Run, json);
            IsolationUtils.FakeManualClient <ReferenceModel>(SimpleDecodeTest_Run, json);
        }
        public void CustomCollectionDecodeTest()
        {
            const string json = "{\"data\": {\"custom_collection\": [\"test1\",\"test2\"]}}";

            IsolationUtils.FakeAttributeClient <SupportedCustomCollectionModel>(CustomCollectionDecodeTest_Run, json);
            IsolationUtils.FakeManualClient <SupportedCustomCollectionModel>(CustomCollectionDecodeTest_Run, json);
        }
        public void ReferenceTypeWithAllPrimitivesDecodeTest()
        {
            var dict = new Dictionary <string, object>
            {
                { "string_val", "test1" },
                { "int_val", 234 },
                { "boolean_val", true },
                { "byte_val", 10 },
                { "long_val", 123 },
                { "float_val", 234.5f },
                { "double_val", 123.4 },
                { "date_time_val", new TimeStampV(new DateTime(2010, 1, 1)) },
                { "short_val", 5 },
                { "u_short_val", 3 },
                { "u_int_val", 2 },
                { "u_long_val", 4 }, // bizarre issue with conversion, ulong will implicit to double for some reason
                { "s_byte_val", 1 },
                { "char_val", "a" },
            };

            var json = JsonConvert.SerializeObject(new { data = dict });

            IsolationUtils.FakeAttributeClient <PrimitivesReferenceModel>(ReferenceTypeWithAllPrimitivesDecodeTest_Run, json);
            IsolationUtils.FakeManualClient <PrimitivesReferenceModel>(ReferenceTypeWithAllPrimitivesDecodeTest_Run, json);
        }
        public void CustomCollectionDecodeTest2()
        {
            var datesJson = JsonConvert.SerializeObject(new[] { new TimeStampV(DateTime.MinValue), new TimeStampV(DateTime.MaxValue) });
            var json      = "{\"data\": {\"custom_collection\": " + datesJson + ", \"dates_array\": " + datesJson + "}}";

            IsolationUtils.FakeAttributeClient <SupportedCustomCollectionModel2>(CustomCollectionDecodeTest2_Run, json);
            IsolationUtils.FakeManualClient <SupportedCustomCollectionModel2>(CustomCollectionDecodeTest2_Run, json);
        }
        public void NamedPropertyModelDecodeTest()
        {
            var dict = new Dictionary <string, object>
            {
                { "not_a_test_string", "test123" }
            };

            var json = JsonConvert.SerializeObject(new { data = dict });

            IsolationUtils.FakeAttributeClient <NamedPropertyModel>(NamedPropertyModelDecodeTest_Run, json);
            IsolationUtils.FakeManualClient <NamedPropertyModel>(NamedPropertyModelDecodeTest_Run, json);
        }
        public void ReferenceTypeWithReferenceTypesDecodeTest()
        {
            var referenceModelDict1 = new Dictionary <string, object>
            {
                { "indexed2", "test2" }
            };
            var referenceModelDict2 = new Dictionary <string, object>
            {
                { "indexed2", "test4" }
            };
            var referenceModelDict3 = new Dictionary <string, object>
            {
                { "indexed2", "test6" }
            };
            var referenceModelDict4 = new Dictionary <string, object>
            {
                { "indexed2", "test8" }
            };
            var referenceModelDict5 = new Dictionary <string, object>
            {
                { "indexed2", "test10" }
            };
            var dict = new Dictionary <string, object>
            {
                { "reference_model", new { @ref = "test1", data = referenceModelDict1 } },
                {
                    "reference_models1",
                    new List <object>
                    {
                        new { @ref = "test3", data = referenceModelDict2 },
                        new { @ref = "test5", data = referenceModelDict3 }
                    }
                },
                {
                    "reference_models2",
                    new[]
                    {
                        new { @ref = "test7", data = referenceModelDict4 },
                        new { @ref = "test9", data = referenceModelDict5 }
                    }
                }
            };

            var json = JsonConvert.SerializeObject(new { data = dict });

            IsolationUtils.FakeAttributeClient <ReferenceTypesReferenceModel>(ReferenceTypeWithReferenceTypesDecodeTest_Run, json);
            IsolationUtils.FakeManualClient <ReferenceTypesReferenceModel>(ReferenceTypeWithReferenceTypesDecodeTest_Run, json);
        }
예제 #7
0
 public void DateTimePaginateTest()
 {
     IsolationUtils.FakeAttributeClient(DateTimePaginateTest_Run);
     IsolationUtils.FakeManualClient(DateTimePaginateTest_Run);
 }
예제 #8
0
 public static void CustomDbFunctionTest()
 {
     IsolationUtils.FakeAttributeClient(CustomDbFunctionTest_Run);
     IsolationUtils.FakeManualClient(CustomDbFunctionTest_Run);
 }
예제 #9
0
 public void SortDirectionPaginateTest()
 {
     IsolationUtils.FakeAttributeClient(SortDirectionPaginateTest_Run);
     IsolationUtils.FakeManualClient(SortDirectionPaginateTest_Run);
 }
예제 #10
0
 public void QueryFailureTest()
 {
     IsolationUtils.FakeAttributeClient(QueryFailureTest_Run);
     IsolationUtils.FakeManualClient(QueryFailureTest_Run);
 }
예제 #11
0
 public void ConditionalQueryTest()
 {
     IsolationUtils.FakeAttributeClient(ConditionalQueryTest_Run);
     IsolationUtils.FakeManualClient(ConditionalQueryTest_Run);
 }
예제 #12
0
 public void NamedPropertyModelEncodeTest()
 {
     IsolationUtils.FakeAttributeClient(NamedPropertyModelEncodeTest_Run);
     IsolationUtils.FakeManualClient(NamedPropertyModelEncodeTest_Run);
 }
예제 #13
0
 public void BasicReferenceTypeSerializationTest()
 {
     IsolationUtils.FakeAttributeClient(BasicReferenceTypeSerializationTest_Run);
     IsolationUtils.FakeManualClient(BasicReferenceTypeSerializationTest_Run);
 }
예제 #14
0
 public void DefaultValueQueryTest()
 {
     IsolationUtils.FakeAttributeClient(DefaultValueQueryTest_Run);
     IsolationUtils.FakeManualClient(DefaultValueQueryTest_Run);
 }
예제 #15
0
 public void FromRefPaginateTest()
 {
     IsolationUtils.FakeAttributeClient(FromRefPaginateTest_Run);
     IsolationUtils.FakeManualClient(FromRefPaginateTest_Run);
 }
예제 #16
0
 public void SelectValueTypePropertyTest()
 {
     IsolationUtils.FakeAttributeClient(SelectValueTypePropertyTest_Run);
     IsolationUtils.FakeManualClient(SelectValueTypePropertyTest_Run);
 }
예제 #17
0
 public void SelectReferenceQueryTest()
 {
     IsolationUtils.FakeAttributeClient(SelectReferenceQueryTest_Run);
     IsolationUtils.FakeManualClient(SelectReferenceQueryTest_Run);
 }
예제 #18
0
 public void NewObjectQueryTest()
 {
     IsolationUtils.FakeAttributeClient(NewObjectQueryTest_Run);
     IsolationUtils.FakeManualClient(NewObjectQueryTest_Run);
 }
예제 #19
0
 public void ArrayInitQueryTest()
 {
     IsolationUtils.FakeAttributeClient(ArrayInitQueryTest_Run);
     IsolationUtils.FakeManualClient(ArrayInitQueryTest_Run);
 }
예제 #20
0
 public void CustomQueryTest()
 {
     IsolationUtils.FakeAttributeClient(CustomQueryTest_Run);
     IsolationUtils.FakeManualClient(CustomQueryTest_Run);
 }
예제 #21
0
 public void IncludeQueryTest()
 {
     IsolationUtils.FakeAttributeClient(IncludeQueryTest_Run);
     IsolationUtils.FakeManualClient(IncludeQueryTest_Run);
 }
예제 #22
0
 public void SerializationFailureTest()
 {
     IsolationUtils.FakeAttributeClient(SerializationFailureTest_Run);
     IsolationUtils.FakeManualClient(SerializationFailureTest_Run);
 }
예제 #23
0
 public void DistinctQueryTest()
 {
     IsolationUtils.FakeAttributeClient(DistinctQueryTest_Run);
     IsolationUtils.FakeManualClient(DistinctQueryTest_Run);
 }
예제 #24
0
 public void SkipTakeQueryTest()
 {
     IsolationUtils.FakeAttributeClient(SkipTakeQueryTest_Run);
     IsolationUtils.FakeManualClient(SkipTakeQueryTest_Run);
 }
예제 #25
0
 public void TypeCheckQueryTest()
 {
     IsolationUtils.FakeAttributeClient(TypeCheckQueryTest_Run);
     IsolationUtils.FakeManualClient(TypeCheckQueryTest_Run);
 }
예제 #26
0
 public void TupleBuiltInMethodTest()
 {
     IsolationUtils.FakeAttributeClient(TupleBuiltInMethodTest_Run);
     IsolationUtils.FakeManualClient(TupleBuiltInMethodTest_Run);
 }
예제 #27
0
 public void LocalListInitTest()
 {
     IsolationUtils.FakeAttributeClient(LocalListInitTest_Run);
     IsolationUtils.FakeManualClient(LocalListInitTest_Run);
 }
예제 #28
0
 public void LocalMethodCallTest()
 {
     IsolationUtils.FakeAttributeClient(LocalMethodCallTest_Run);
     IsolationUtils.FakeManualClient(LocalMethodCallTest_Run);
 }
예제 #29
0
 public void ReferenceTypeWithValueTypesTest()
 {
     IsolationUtils.FakeAttributeClient(ReferenceTypeWithValueTypesTest_Run);
     IsolationUtils.FakeManualClient(ReferenceTypeWithValueTypesTest_Run);
 }
예제 #30
0
 public void MemberInitTest()
 {
     IsolationUtils.FakeAttributeClient(MemberInitTest_Run);
     IsolationUtils.FakeManualClient(MemberInitTest_Run);
 }