private static void AddIncompleteSite()
        {
            var siteManager = new SitesManager();

            // Test with invalid required parameters
            siteManager.addSite("", null);
        }
        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);
        }
        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);
        }
        private static void DeleteSite()
        {
            var siteManager = new SitesManager();
            siteManager.setTokenAuth("XYZ");

            var status = siteManager.deleteSite(23);

            if (status)
            {
                Console.WriteLine("Site removed");
            }
        }
        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);
        }
        private static void UpdateSite()
        {
            var siteManager = new SitesManager();
            siteManager.setTokenAuth("XYZ");

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

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

            if (status)
            {
                Console.WriteLine("Site updated");
            }
        }
        private static void GetSitesIdFromSiteUrl()
        {
            var siteManager = new SitesManager();
            siteManager.setTokenAuth("XYZ");

            var sites = siteManager.getSitesIdFromSiteUrl("http://brandNew");

            Console.WriteLine(sites.Count + " sites found");

            foreach (Hashtable site in sites)
            {
                Console.WriteLine(site[SitesManager.ID]);
            }
        }
        private static void getSiteFromId()
        {
            var siteManager = new SitesManager();
            siteManager.setTokenAuth("XYZ");

            var sites = siteManager.getSiteFromId(1);

            Console.WriteLine(sites.Count + " sites found");

            foreach (Hashtable site in sites)
            {
                Console.WriteLine(
                    site[SitesManager.ID] + " " +
                    site[SitesManager.NAME] + " " +
                    site[SitesManager.MAIN_URL] + " " +
                    site[SitesManager.TS_CREATED] + " " +
                    site[SitesManager.TIMEZONE] + " " +
                    site[SitesManager.CURRENCY] + " " +
                    site[SitesManager.EXCLUDED_IPS] + " " +
                    site[SitesManager.EXCLUDED_PARAMETERS] + " " +
                    site[SitesManager.FEEDBURNER_NAME] + " " +
                    site[SitesManager.GROUP] + " " +
                    site[SitesManager.ECOMMERCE]
                );
            }
        }