Exemplo n.º 1
0
		public void WebMethodGetsCorrectResponseTest()
		{
			var api = new MetApi();

			var resp = api.GetHtml();
			Assert.IsTrue(resp.IndexOf("search-results-container") > 0);
		}
Exemplo n.º 2
0
		public void PaintingHtmlReturnedProperlyTest()
		{
			var api = new MetApi();
			
			api.GetPaintingPage();

			Assert.IsTrue(api.GetPaintingHtml().IndexOf("object-information") > 0);
		}
Exemplo n.º 3
0
		public void GetRandomPaintingUrlTest()
		{
			var api = new MetApi();
			
			var url = api.GetPaintingPage();

			Assert.IsTrue(url.IndexOf("pos=") > 0);
		}
Exemplo n.º 4
0
		public void GetNumberOfPaintingsOnPageTest()
		{
			var api = new MetApi();
			
			api.GetRandomPage();

			Assert.IsTrue(api.GetPaintingsOnPage() > 0);
		}
Exemplo n.º 5
0
		public void GetRandomPageTest()
		{
			var api = new MetApi();
			
			api.GetRandomPage();

			Assert.IsTrue(api.GetHtml().IndexOf("search-results-container") > 0);
		}
Exemplo n.º 6
0
		public void PaintingImageUrlReturnsProperlyTest()
		{
			var api = new MetApi();
			
			api.GetPaintingPage();
			var painting = api.GetPaintingInfo();

			Assert.IsTrue(painting.Url.IndexOf("web-large") > 0);
		}
Exemplo n.º 7
0
		public void WebMethodGetPageCountTest()
		{
			var api = new MetApi();

			Assert.IsTrue(api.PageCount > 0);
		}
Exemplo n.º 8
0
		public void WebMethodGetsResponseTest()
		{
			var api = new MetApi();
			Assert.IsTrue(api.GetHtml().Length > 0);
		}