public static void LandingPageShouldReturnHtml( SpApi spApi ) { var request = new RestRequest( spApi.GetApiPrefix(ApiType.WebApiRoot) ); request.AddHeader( "Accept", "text/html" ); var response = spApi.Execute( request ); Assert.Equal( HttpStatusCode.OK, response.StatusCode ); Assert.True( response.ContentType.StartsWith( "text/html" ) ); }
public static void LandingPageShouldContainSignedVendorId( SpApi spApi ) { var request = new RestRequest( spApi.GetApiPrefix( ApiType.WebApiRoot ) ); request.AddHeader( "Accept", "text/html" ); var response = spApi.Execute( request ); Assert.Equal( HttpStatusCode.OK, response.StatusCode ); Assert.True( response.ContentType.StartsWith( "text/html" ) ); HtmlDocument doc = new HtmlDocument(); doc.LoadHtml( response.Content ); var node = doc.DocumentNode.SelectSingleNode( "//span[@data-claimid='vendorid']" ); Assert.NotNull( node ); Assert.Contains( "bff714f1-3c88-40e7-9e78-a73c041ac8eb", node.InnerText ); }