@@ -4,7 +4,6 @@ var expect = require('chai').expect,
44 mainCollection = require ( './fixtures/testcollection/collection.json' ) ,
55 testCollection = require ( './fixtures/testcollection/collectionForEdge.json' ) ,
66 getOptions = require ( '../../lib/index' ) . getOptions ,
7- testResponse = require ( './fixtures/testresponse.json' ) ,
87 testResponseAsync = require ( './fixtures/testResponseAsync.json' ) ,
98 testResponseJsonParams = require ( './fixtures/testResponseJsonParams.json' ) ,
109 sanitize = require ( '../../lib/util' ) . sanitize ,
@@ -13,25 +12,6 @@ var expect = require('chai').expect,
1312describe ( 'csharp restsharp function' , function ( ) {
1413
1514 describe ( 'csharp-restsharp convert function' , function ( ) {
16- it ( 'should return expected snippet' , function ( ) {
17- var request = new sdk . Request ( mainCollection . item [ 4 ] . request ) ,
18- options = {
19- indentCount : 1 ,
20- indentType : 'Tab' ,
21- followRedirect : true ,
22- trimRequestBody : true ,
23- asyncType : 'sync'
24- } ;
25-
26- convert ( request , options , function ( error , snippet ) {
27- if ( error ) {
28- expect . fail ( null , null , error ) ;
29- return ;
30- }
31- expect ( snippet ) . deep . equal ( testResponse . result ) ;
32- } ) ;
33- } ) ;
34-
3515 it ( 'should return expected snippet - Async' , function ( ) {
3616 var request = new sdk . Request ( mainCollection . item [ 4 ] . request ) ,
3717 options = {
@@ -86,6 +66,7 @@ describe('csharp restsharp function', function () {
8666 }
8767 expect ( snippet ) . to . include ( 'using System;\nusing RestSharp;\nusing System.Threading;\nusing' +
8868 ' System.Threading.Tasks;\nnamespace HelloWorldApplication {\n' ) ;
69+ expect ( snippet ) . to . include ( 'static async Task Main(string[] args) {' ) ;
8970 } ) ;
9071 } ) ;
9172
@@ -233,26 +214,6 @@ describe('csharp restsharp function', function () {
233214 } ) ;
234215 } ) ;
235216
236- it ( 'should return snippet with boilerplate code given option and async' , function ( ) {
237- convert ( request , { includeBoilerplate : true } , function ( error , snippet ) {
238- if ( error ) {
239- expect . fail ( null , null , error ) ;
240- return ;
241- }
242- expect ( snippet ) . to . include ( 'static async Task Main(string[] args) {' ) ;
243- } ) ;
244- } ) ;
245-
246- it ( 'should return snippet with boilerplate code given option and sync' , function ( ) {
247- convert ( request , { includeBoilerplate : true , asyncType : 'sync' } , function ( error , snippet ) {
248- if ( error ) {
249- expect . fail ( null , null , error ) ;
250- return ;
251- }
252- expect ( snippet ) . to . include ( 'static void Main(string[] args) {' ) ;
253- } ) ;
254- } ) ;
255-
256217 } ) ;
257218
258219 describe ( 'getOptions function' , function ( ) {
@@ -339,7 +300,6 @@ describe('csharp restsharp function', function () {
339300
340301 it ( 'should return the same object when valid (but not necessarily defaults) options are provided' , function ( ) {
341302 testOptions = { } ;
342- testOptions . asyncType = 'async' ;
343303 testOptions . indentType = 'Tab' ;
344304 testOptions . indentCount = 3 ;
345305 testOptions . requestTimeout = 3000 ;
0 commit comments