Example #1
0
        public void GetCampaignGeoTargets()
        {
            AdwordsClient    client = new AdwordsClient();
            List <GeoTarget> result = client.GetCampaignGeoTargets("931755099");

            Assert.That(result, Is.Not.Null);
        }
Example #2
0
        public void GetAdwordsCampaigns()
        {
            AdwordsClient          client = new AdwordsClient();
            List <AdwordsCampaign> result = client.GetCampaigns();

            Assert.That(result, Is.Not.Null);
        }
Example #3
0
        public void GetCampaignGeoTargets_NonExistingCampaignId()
        {
            AdwordsClient client = new AdwordsClient();

            try
            {
                client.GetCampaignGeoTargets("123456789");
            }
            catch (Exception e)
            {
                Assert.That(e.Message, Is.EqualTo("Campaign not found."));
            }
        }
Example #4
0
        public void GetCampaignGeoTargets_EmptyCampaignId()
        {
            AdwordsClient client = new AdwordsClient();

            try
            {
                client.GetCampaignGeoTargets("");
                Assert.That(false);
            }
            catch (Exception e)
            {
                Assert.That(e.Message, Is.EqualTo("Input string was not in a correct format."));
            }
        }