Пример #1
0
        private static void AddIncompleteSite()
        {
            var siteManager = new SitesManager();

            // Test with invalid required parameters
            siteManager.addSite("", null);
        }
Пример #2
0
        private static void AddUnthorizedSite()
        {
            var siteManager = new SitesManager();

            // Test with valid required parameters but without the token auth
            string[] urls = { "http://brandNew", "http://shinyNew" };
            siteManager.addSite("Brand New Site", urls);
        }
Пример #3
0
        private static void AddMinimalSite()
        {
            var siteManager = new SitesManager();

            siteManager.setTokenAuth("XYZ");

            string[] urls = { "http://brandNew", "http://shinyNew" };

            var newSiteId = siteManager.addSite("Brand New Site", urls);

            Console.WriteLine("Brand New Site correctly created with id = " + newSiteId);
        }
Пример #4
0
        private static void addComplexeSite()
        {
            var siteManager = new SitesManager();

            siteManager.setTokenAuth("XYZ");

            string[] urls                    = { "http://brandNew", "http://shinyNew" };
            string[] excludedIps             = { "123.123.13.1", "212.21.11.2" };
            string[] excludedQueryParameters = { "key1", "key2" };

            var newSiteId = siteManager.addSite("Brand New Site", urls, true, excludedIps, excludedQueryParameters, "UTC-4", "USD", "group2", new DateTime(2011, 01, 10));

            Console.WriteLine("Brand New Site correctly created with id = " + newSiteId);
        }