Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

OData acceptance tests with QUnit and datajs

$
0
0

Quickly create Acceptance Test for OData Services

 

 

var request = {

  resourcePath: "CarrierCollection('LH')",

  headers: {Accept: "application/atom+xml"}

};

odataTest("Lufthansa", 3, request, function (response, data) {

  equal(response.statusCode, 200, "StatusCode: 200");

  expectedHeaders(response.headers,

    { "Content-Type" : "application/atom+xml" }, "Content-Type: application/atom+xml" );

  equal(data.AirLineName, "Lufthansa", "AirLineName: Lufthansa");

});


  • Run the test

09.05.png   

  
Qunit-OData addon

 

The source code of the qunit addon is available on github.

 

 

 



Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>