Exemple #1
0
        public void Test_delete_user_posts_with_mutplie_path()
        {
            RequestMap map = new RequestMap();

            map.Set("user_id", "1");
            map.Set("post_id", "2");


            MultiplePathUserPost response = MultiplePathUserPost.Delete("", map);

            Assert.NotNull(response);

            List <string> ignoreAsserts = new List <string>();



            BaseTest.putResponse("delete_user_posts_with_mutplie_path", response);
        }
Exemple #2
0
        public void Test_get_user_posts_with_mutplie_path()
        {
            RequestMap map = new RequestMap();

            map.Set("user_id", "1");
            map.Set("post_id", "2");


            List <MultiplePathUserPost> responseList = MultiplePathUserPost.List(map);
            MultiplePathUserPost        response     = responseList[0];

            List <string> ignoreAsserts = new List <string>();

            BaseTest.assertEqual(ignoreAsserts, response, "id", "1");
            BaseTest.assertEqual(ignoreAsserts, response, "title", "My Title");
            BaseTest.assertEqual(ignoreAsserts, response, "body", "some body text");
            BaseTest.assertEqual(ignoreAsserts, response, "userId", "1");


            BaseTest.putResponse("get_user_posts_with_mutplie_path", responseList[0]);
        }
Exemple #3
0
        public void Test_update_user_posts_with_mutplie_path()
        {
            RequestMap map = new RequestMap();

            map.Set("user_id", "1");
            map.Set("post_id", "1");
            map.Set("testQuery", "testQuery");
            map.Set("name", "Joe Bloggs");
            map.Set("username", "jbloggs");
            map.Set("email", "*****@*****.**");
            map.Set("phone", "1-770-736-8031");
            map.Set("website", "hildegard.org");
            map.Set("address.line1", "2000 Purchase Street");
            map.Set("address.city", "New York");
            map.Set("address.state", "NY");
            map.Set("address.postalCode", "10577");


            MultiplePathUserPost response = new MultiplePathUserPost(map).Update();

            List <string> ignoreAsserts = new List <string>();


            BaseTest.assertEqual(ignoreAsserts, response, "website", "hildegard.org");
            BaseTest.assertEqual(ignoreAsserts, response, "address.instructions.doorman", "true");
            BaseTest.assertEqual(ignoreAsserts, response, "address.instructions.text", "some delivery instructions text");
            BaseTest.assertEqual(ignoreAsserts, response, "address.city", "New York");
            BaseTest.assertEqual(ignoreAsserts, response, "address.postalCode", "10577");
            BaseTest.assertEqual(ignoreAsserts, response, "address.id", "1");
            BaseTest.assertEqual(ignoreAsserts, response, "address.state", "NY");
            BaseTest.assertEqual(ignoreAsserts, response, "address.line1", "2000 Purchase Street");
            BaseTest.assertEqual(ignoreAsserts, response, "phone", "1-770-736-8031");
            BaseTest.assertEqual(ignoreAsserts, response, "name", "Joe Bloggs");
            BaseTest.assertEqual(ignoreAsserts, response, "id", "1");
            BaseTest.assertEqual(ignoreAsserts, response, "email", "*****@*****.**");
            BaseTest.assertEqual(ignoreAsserts, response, "username", "jbloggs");


            BaseTest.putResponse("update_user_posts_with_mutplie_path", response);
        }