Esempio n. 1
0
        public static List <ZumoTestGroup> CreateTestGroups()
        {
            List <ZumoTestGroup> result = new List <ZumoTestGroup>
            {
#if !NET45
                ZumoLoginTests.CreateTests(),
#endif
                ZumoCustomApiTests.CreateTests(),
                                 ZumoRoundTripTests.CreateTests(),
                                 ZumoQueryTests.CreateTests(),
                                 ZumoCUDTests.CreateTests(),
                                 ZumoMiscTests.CreateTests(),
#if WINDOWS_PHONE
                                 ZumoWP8PushTests.CreateTests(),
#endif
#if NETFX_CORE
                                 ZumoPushTests.CreateTests()
#endif
            };

            ZumoTestGroup allTestsUnattendedGroup = CreateGroupWithAllTests(result, true);
            ZumoTestGroup allTestsGroup           = CreateGroupWithAllTests(result, false);

            result.Add(allTestsUnattendedGroup);
            result.Add(allTestsGroup);

            return(result);
        }
Esempio n. 2
0
        internal static ZumoTestGroup CreateTests()
        {
            ZumoTestGroup result = new ZumoTestGroup("Custom API tests");

            DateTime now    = DateTime.UtcNow;
            int      seed   = now.Year * 10000 + now.Month * 100 + now.Day;
            Random   rndGen = new Random(seed);

#if !NET45
            result.AddTest(ZumoLoginTests.CreateLogoutTest());
#endif

            result.AddTest(CreateHttpContentApiTest(DataFormat.Xml, DataFormat.Json, rndGen));

#if !NET45
            List <ZumoTest> testsWhichNeedAuth = new List <ZumoTest>();

            foreach (ApiPermissions apiPermission in Util.EnumGetValues(typeof(ApiPermissions)))
            {
                testsWhichNeedAuth.Add(CreateJTokenApiTest(apiPermission, false, rndGen));
            }

            testsWhichNeedAuth.Add(ZumoLoginTests.CreateLoginTest(MobileServiceAuthenticationProvider.Google));
            testsWhichNeedAuth.Add(CreateJTokenApiTest(ApiPermissions.User, true, rndGen));
            testsWhichNeedAuth.Add(ZumoLoginTests.CreateLogoutTest());

            foreach (var test in testsWhichNeedAuth)
            {
                test.CanRunUnattended = false;
                result.AddTest(test);
            }
#endif

            foreach (DataFormat inputFormat in Util.EnumGetValues(typeof(DataFormat)))
            {
                foreach (DataFormat outputFormat in Util.EnumGetValues(typeof(DataFormat)))
                {
                    result.AddTest(CreateHttpContentApiTest(inputFormat, outputFormat, rndGen));
                }
            }


            result.AddTest(ZumoQueryTests.CreatePopulateTableTest());
            foreach (TypedTestType testType in Util.EnumGetValues(typeof(TypedTestType)))
            {
                result.AddTest(CreateTypedApiTest(rndGen, testType));
            }

            return(result);
        }
Esempio n. 3
0
        public static List <ZumoTestGroup> CreateTests()
        {
            List <ZumoTestGroup> result = new List <ZumoTestGroup>
            {
                ZumoRoundTripTests.CreateTests(),
                                 ZumoQueryTests.CreateTests(),
                                 ZumoCUDTests.CreateTests(),
                                 ZumoLoginTests.CreateTests(),
                                 ZumoMiscTests.CreateTests(),
                                 ZumoPushTests.CreateTests(),
            };

            return(result);
        }
        public static List <ZumoTestGroup> CreateTests()
        {
            List <ZumoTestGroup> result = new List <ZumoTestGroup>
            {
                ZumoRoundTripTests.CreateTests(),
                                 ZumoQueryTests.CreateTests(),
                                 ZumoCUDTests.CreateTests(),
                                 ZumoMiscTests.CreateTests(),
#if WINDOWS_PHONE
                                 ZumoWP8PushTests.CreateTests(),
#endif
#if NETFX_CORE
                                 ZumoPushTests.CreateTests(),
#endif
#if !NET45
                                 ZumoLoginTests.CreateTests(),
#endif
            };

            return(result);
        }