public void TestGetCreative() { Creative localCreative = null; Assert.DoesNotThrow(delegate() { localCreative = creativeService.getCreative(creative1.id); }); Assert.NotNull(localCreative); Assert.AreEqual(localCreative.id, creative1.id); Assert.AreEqual(localCreative.GetType(), creative1.GetType()); Assert.AreEqual(localCreative.name, creative1.name); Assert.AreEqual(localCreative.advertiserId, creative1.advertiserId); Assert.AreEqual(localCreative.previewUrl, creative1.previewUrl); Assert.AreEqual(localCreative.size.height, creative1.size.height); Assert.AreEqual(localCreative.size.width, creative1.size.width); }
public void TestGetCreativesByStatement() { Statement statement = new Statement(); statement.query = string.Format("WHERE id = '{0}' LIMIT 500", creative1.id); CreativePage page = null; Assert.DoesNotThrow(delegate() { page = creativeService.getCreativesByStatement(statement); }); Assert.NotNull(page); Assert.NotNull(page.results); Assert.AreEqual(page.totalResultSetSize, 1); Assert.NotNull(page.results[0]); Assert.AreEqual(page.results[0].id, creative1.id); Assert.AreEqual(page.results[0].GetType(), creative1.GetType()); Assert.AreEqual(page.results[0].name, creative1.name); Assert.AreEqual(page.results[0].advertiserId, creative1.advertiserId); Assert.AreEqual(page.results[0].previewUrl, creative1.previewUrl); Assert.AreEqual(page.results[0].size.height, creative1.size.height); Assert.AreEqual(page.results[0].size.width, creative1.size.width); }