example
This commit is contained in:
		
							
								
								
									
										62
									
								
								example/clients/javascript/test/api/GreetApi.spec.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								example/clients/javascript/test/api/GreetApi.spec.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 
 | 
			
		||||
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 | 
			
		||||
 *
 | 
			
		||||
 * OpenAPI spec version: 
 | 
			
		||||
 *
 | 
			
		||||
 * NOTE: This class is auto generated by the swagger code generator program.
 | 
			
		||||
 * https://github.com/swagger-api/swagger-codegen.git
 | 
			
		||||
 *
 | 
			
		||||
 * Swagger Codegen version: 2.4.18
 | 
			
		||||
 *
 | 
			
		||||
 * Do not edit the class manually.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
(function(root, factory) {
 | 
			
		||||
  if (typeof define === 'function' && define.amd) {
 | 
			
		||||
    // AMD.
 | 
			
		||||
    define(['expect.js', '../../src/index'], factory);
 | 
			
		||||
  } else if (typeof module === 'object' && module.exports) {
 | 
			
		||||
    // CommonJS-like environments that support module.exports, like Node.
 | 
			
		||||
    factory(require('expect.js'), require('../../src/index'));
 | 
			
		||||
  } else {
 | 
			
		||||
    // Browser globals (root is window)
 | 
			
		||||
    factory(root.expect, root.SwaggerJsClient);
 | 
			
		||||
  }
 | 
			
		||||
}(this, function(expect, SwaggerJsClient) {
 | 
			
		||||
  'use strict';
 | 
			
		||||
 | 
			
		||||
  var instance;
 | 
			
		||||
 | 
			
		||||
  beforeEach(function() {
 | 
			
		||||
    instance = new SwaggerJsClient.GreetApi();
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  describe('(package)', function() {
 | 
			
		||||
    describe('GreetApi', function() {
 | 
			
		||||
      describe('ping', function() {
 | 
			
		||||
        it('should call ping successfully', function(done) {
 | 
			
		||||
          // TODO: uncomment ping call and complete the assertions
 | 
			
		||||
          /*
 | 
			
		||||
 | 
			
		||||
          instance.ping(function(error, data, response) {
 | 
			
		||||
            if (error) {
 | 
			
		||||
              done(error);
 | 
			
		||||
              return;
 | 
			
		||||
            }
 | 
			
		||||
            // TODO: update response assertions
 | 
			
		||||
            expect(data).to.be.a(Object);
 | 
			
		||||
            // expect(data).to.be(null);
 | 
			
		||||
 | 
			
		||||
            done();
 | 
			
		||||
          });
 | 
			
		||||
          */
 | 
			
		||||
          // TODO: uncomment and complete method invocation above, then delete this line and the next:
 | 
			
		||||
          done();
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}));
 | 
			
		||||
							
								
								
									
										181
									
								
								example/clients/javascript/test/api/UserApiApi.spec.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										181
									
								
								example/clients/javascript/test/api/UserApiApi.spec.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,181 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 
 | 
			
		||||
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 | 
			
		||||
 *
 | 
			
		||||
 * OpenAPI spec version: 
 | 
			
		||||
 *
 | 
			
		||||
 * NOTE: This class is auto generated by the swagger code generator program.
 | 
			
		||||
 * https://github.com/swagger-api/swagger-codegen.git
 | 
			
		||||
 *
 | 
			
		||||
 * Swagger Codegen version: 2.4.18
 | 
			
		||||
 *
 | 
			
		||||
 * Do not edit the class manually.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
(function(root, factory) {
 | 
			
		||||
  if (typeof define === 'function' && define.amd) {
 | 
			
		||||
    // AMD.
 | 
			
		||||
    define(['expect.js', '../../src/index'], factory);
 | 
			
		||||
  } else if (typeof module === 'object' && module.exports) {
 | 
			
		||||
    // CommonJS-like environments that support module.exports, like Node.
 | 
			
		||||
    factory(require('expect.js'), require('../../src/index'));
 | 
			
		||||
  } else {
 | 
			
		||||
    // Browser globals (root is window)
 | 
			
		||||
    factory(root.expect, root.SwaggerJsClient);
 | 
			
		||||
  }
 | 
			
		||||
}(this, function(expect, SwaggerJsClient) {
 | 
			
		||||
  'use strict';
 | 
			
		||||
 | 
			
		||||
  var instance;
 | 
			
		||||
 | 
			
		||||
  beforeEach(function() {
 | 
			
		||||
    instance = new SwaggerJsClient.UserApiApi();
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  describe('(package)', function() {
 | 
			
		||||
    describe('UserApiApi', function() {
 | 
			
		||||
      describe('getUserInfo', function() {
 | 
			
		||||
        it('should call getUserInfo successfully', function(done) {
 | 
			
		||||
          // TODO: uncomment, update parameter values for getUserInfo call and complete the assertions
 | 
			
		||||
          /*
 | 
			
		||||
          var id = "id_example";
 | 
			
		||||
          var body = new SwaggerJsClient.UserInfoReq();
 | 
			
		||||
          body.id = "";
 | 
			
		||||
 | 
			
		||||
          instance.getUserInfo(id, body, function(error, data, response) {
 | 
			
		||||
            if (error) {
 | 
			
		||||
              done(error);
 | 
			
		||||
              return;
 | 
			
		||||
            }
 | 
			
		||||
            // TODO: update response assertions
 | 
			
		||||
            expect(data).to.be.a(SwaggerJsClient.UserInfoReply);
 | 
			
		||||
            expect(data.name).to.be.a('string');
 | 
			
		||||
            expect(data.name).to.be("");
 | 
			
		||||
            expect(data.age).to.be.a('number');
 | 
			
		||||
            expect(data.age).to.be(0);
 | 
			
		||||
            expect(data.birthday).to.be.a('string');
 | 
			
		||||
            expect(data.birthday).to.be("");
 | 
			
		||||
            expect(data.description).to.be.a('string');
 | 
			
		||||
            expect(data.description).to.be("");
 | 
			
		||||
            {
 | 
			
		||||
              let dataCtr = data.tag;
 | 
			
		||||
              expect(dataCtr).to.be.an(Array);
 | 
			
		||||
              expect(dataCtr).to.not.be.empty();
 | 
			
		||||
              for (let p in dataCtr) {
 | 
			
		||||
                let data = dataCtr[p];
 | 
			
		||||
                expect(data).to.be.a('string');
 | 
			
		||||
                expect(data).to.be("");
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            done();
 | 
			
		||||
          });
 | 
			
		||||
          */
 | 
			
		||||
          // TODO: uncomment and complete method invocation above, then delete this line and the next:
 | 
			
		||||
          done();
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
      describe('login', function() {
 | 
			
		||||
        it('should call login successfully', function(done) {
 | 
			
		||||
          // TODO: uncomment, update parameter values for login call and complete the assertions
 | 
			
		||||
          /*
 | 
			
		||||
          var body = new SwaggerJsClient.LoginReq();
 | 
			
		||||
          body.username = "";
 | 
			
		||||
          body.password = "";
 | 
			
		||||
 | 
			
		||||
          instance.login(body, function(error, data, response) {
 | 
			
		||||
            if (error) {
 | 
			
		||||
              done(error);
 | 
			
		||||
              return;
 | 
			
		||||
            }
 | 
			
		||||
            // TODO: update response assertions
 | 
			
		||||
            expect(data).to.be.a(Object);
 | 
			
		||||
            // expect(data).to.be(null);
 | 
			
		||||
 | 
			
		||||
            done();
 | 
			
		||||
          });
 | 
			
		||||
          */
 | 
			
		||||
          // TODO: uncomment and complete method invocation above, then delete this line and the next:
 | 
			
		||||
          done();
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
      describe('register', function() {
 | 
			
		||||
        it('should call register successfully', function(done) {
 | 
			
		||||
          // TODO: uncomment, update parameter values for register call and complete the assertions
 | 
			
		||||
          /*
 | 
			
		||||
          var body = new SwaggerJsClient.RegisterReq();
 | 
			
		||||
          body.username = "";
 | 
			
		||||
          body.password = "";
 | 
			
		||||
          body.mobile = "";
 | 
			
		||||
 | 
			
		||||
          instance.register(body, function(error, data, response) {
 | 
			
		||||
            if (error) {
 | 
			
		||||
              done(error);
 | 
			
		||||
              return;
 | 
			
		||||
            }
 | 
			
		||||
            // TODO: update response assertions
 | 
			
		||||
            expect(data).to.be.a(Object);
 | 
			
		||||
            // expect(data).to.be(null);
 | 
			
		||||
 | 
			
		||||
            done();
 | 
			
		||||
          });
 | 
			
		||||
          */
 | 
			
		||||
          // TODO: uncomment and complete method invocation above, then delete this line and the next:
 | 
			
		||||
          done();
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
      describe('searchUser', function() {
 | 
			
		||||
        it('should call searchUser successfully', function(done) {
 | 
			
		||||
          // TODO: uncomment, update parameter values for searchUser call and complete the assertions
 | 
			
		||||
          /*
 | 
			
		||||
          var body = new SwaggerJsClient.UserSearchReq();
 | 
			
		||||
          body.keyWord = "";
 | 
			
		||||
 | 
			
		||||
          instance.searchUser(body, function(error, data, response) {
 | 
			
		||||
            if (error) {
 | 
			
		||||
              done(error);
 | 
			
		||||
              return;
 | 
			
		||||
            }
 | 
			
		||||
            // TODO: update response assertions
 | 
			
		||||
            expect(data).to.be.a(SwaggerJsClient.UserSearchReply);
 | 
			
		||||
            {
 | 
			
		||||
              let dataCtr = data.keyWord;
 | 
			
		||||
              expect(dataCtr).to.be.an(Array);
 | 
			
		||||
              expect(dataCtr).to.not.be.empty();
 | 
			
		||||
              for (let p in dataCtr) {
 | 
			
		||||
                let data = dataCtr[p];
 | 
			
		||||
                expect(data).to.be.a(SwaggerJsClient.UserInfoReply);
 | 
			
		||||
                expect(data.name).to.be.a('string');
 | 
			
		||||
                expect(data.name).to.be("");
 | 
			
		||||
                expect(data.age).to.be.a('number');
 | 
			
		||||
                expect(data.age).to.be(0);
 | 
			
		||||
                expect(data.birthday).to.be.a('string');
 | 
			
		||||
                expect(data.birthday).to.be("");
 | 
			
		||||
                expect(data.description).to.be.a('string');
 | 
			
		||||
                expect(data.description).to.be("");
 | 
			
		||||
                {
 | 
			
		||||
                  let dataCtr = data.tag;
 | 
			
		||||
                  expect(dataCtr).to.be.an(Array);
 | 
			
		||||
                  expect(dataCtr).to.not.be.empty();
 | 
			
		||||
                  for (let p in dataCtr) {
 | 
			
		||||
                    let data = dataCtr[p];
 | 
			
		||||
                    expect(data).to.be.a('string');
 | 
			
		||||
                    expect(data).to.be("");
 | 
			
		||||
                  }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                      }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            done();
 | 
			
		||||
          });
 | 
			
		||||
          */
 | 
			
		||||
          // TODO: uncomment and complete method invocation above, then delete this line and the next:
 | 
			
		||||
          done();
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}));
 | 
			
		||||
							
								
								
									
										81
									
								
								example/clients/javascript/test/assert-equals.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								example/clients/javascript/test/assert-equals.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,81 @@
 | 
			
		||||
(function(root, factory) {
 | 
			
		||||
  if (typeof define === 'function' && define.amd) {
 | 
			
		||||
    // AMD.
 | 
			
		||||
    define(factory);
 | 
			
		||||
  } else if (typeof module === 'object' && module.exports) {
 | 
			
		||||
    // CommonJS-like environments that support module.exports, like Node.
 | 
			
		||||
    module.exports = factory();
 | 
			
		||||
  } else {
 | 
			
		||||
    // Browser globals (root is window)
 | 
			
		||||
    root.assertEquals = factory();
 | 
			
		||||
  }
 | 
			
		||||
}(this, function() {
 | 
			
		||||
  'use strict';
 | 
			
		||||
 | 
			
		||||
  var assertEquals = function(expected, actual, ptr) {
 | 
			
		||||
    if (!ptr)
 | 
			
		||||
      ptr = "";
 | 
			
		||||
    if (actual === expected)
 | 
			
		||||
      return;
 | 
			
		||||
    if (expected instanceof Date || actual instanceof Date) {
 | 
			
		||||
      expected = toISODateString(expected);
 | 
			
		||||
      actual = toISODateString(actual);
 | 
			
		||||
      if (actual !== expected)
 | 
			
		||||
        fail(expected, actual, ptr, "date value incorrect;");
 | 
			
		||||
    }
 | 
			
		||||
    if (!expected || !actual || typeof expected != 'object' && typeof actual != 'object') {
 | 
			
		||||
      if (typeof actual != typeof expected)
 | 
			
		||||
        fail(typeof expected, typeof actual, ptr, "value type incorrect;");
 | 
			
		||||
      if (actual != expected)
 | 
			
		||||
        fail(expected, actual, ptr, "value incorrect;");
 | 
			
		||||
    }
 | 
			
		||||
    return checkObject(expected, actual, ptr);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function toISODateString(value) {
 | 
			
		||||
    if (value instanceof Date) {
 | 
			
		||||
      // JavaScript's ISO string contains a milliseconds component that must be stripped out.
 | 
			
		||||
      value = value.toISOString().replace('.000', '');
 | 
			
		||||
    }
 | 
			
		||||
    return value;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function checkObject(expected, actual, ptr) {
 | 
			
		||||
    if (undefOrNull(expected) || undefOrNull(actual))
 | 
			
		||||
      fail(expected, actual, ptr, "missing value;");
 | 
			
		||||
    if (typeof expected !== typeof actual)
 | 
			
		||||
      fail(typeof expected, typeof actual, ptr, "wrong type;");
 | 
			
		||||
    if (expected.prototype !== actual.prototype)
 | 
			
		||||
      fail(expected.prototype, actual.prototype, ptr, "wrong prototype;");
 | 
			
		||||
    try {
 | 
			
		||||
      var expectedKeys = Object.keys(expected);
 | 
			
		||||
      var actualKeys = Object.keys(actual);
 | 
			
		||||
    } catch (e) {
 | 
			
		||||
      fail(expectedKeys, actualKeys, ptr, "wrong keys;");
 | 
			
		||||
    }
 | 
			
		||||
    if (actualKeys.length != expectedKeys.length)
 | 
			
		||||
      fail(expectedKeys.length, actualKeys.length, ptr, "key count incorrect;");
 | 
			
		||||
    expectedKeys.sort();
 | 
			
		||||
    actualKeys.sort();
 | 
			
		||||
    for (var i = 0; i < expectedKeys.length; i++) {
 | 
			
		||||
      if (actualKeys[i] != expectedKeys[i])
 | 
			
		||||
        fail(expectedKeys, actualKeys, ptr, "wrong keys;");
 | 
			
		||||
    }
 | 
			
		||||
    for (i = 0; i < expectedKeys.length; i++) {
 | 
			
		||||
      var key = expectedKeys[i];
 | 
			
		||||
      assertEquals(expected[key], actual[key], ptr + '/' + key);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function undefOrNull(v) {
 | 
			
		||||
    return v === undefined || v === null;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function fail(expected, actual, ptr, msg) {
 | 
			
		||||
    var text = ptr + ' ' + msg + " expected: " + expected + ", actual: " + actual;
 | 
			
		||||
    console.log(text);
 | 
			
		||||
    throw new Error(text);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return assertEquals;
 | 
			
		||||
}));
 | 
			
		||||
							
								
								
									
										58
									
								
								example/clients/javascript/test/model/LoginReq.spec.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								example/clients/javascript/test/model/LoginReq.spec.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,58 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 
 | 
			
		||||
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 | 
			
		||||
 *
 | 
			
		||||
 * OpenAPI spec version: 
 | 
			
		||||
 *
 | 
			
		||||
 * NOTE: This class is auto generated by the swagger code generator program.
 | 
			
		||||
 * https://github.com/swagger-api/swagger-codegen.git
 | 
			
		||||
 *
 | 
			
		||||
 * Swagger Codegen version: 2.4.18
 | 
			
		||||
 *
 | 
			
		||||
 * Do not edit the class manually.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
(function(root, factory) {
 | 
			
		||||
  if (typeof define === 'function' && define.amd) {
 | 
			
		||||
    // AMD.
 | 
			
		||||
    define(['expect.js', '../../src/index'], factory);
 | 
			
		||||
  } else if (typeof module === 'object' && module.exports) {
 | 
			
		||||
    // CommonJS-like environments that support module.exports, like Node.
 | 
			
		||||
    factory(require('expect.js'), require('../../src/index'));
 | 
			
		||||
  } else {
 | 
			
		||||
    // Browser globals (root is window)
 | 
			
		||||
    factory(root.expect, root.SwaggerJsClient);
 | 
			
		||||
  }
 | 
			
		||||
}(this, function(expect, SwaggerJsClient) {
 | 
			
		||||
  'use strict';
 | 
			
		||||
 | 
			
		||||
  var instance;
 | 
			
		||||
 | 
			
		||||
  describe('(package)', function() {
 | 
			
		||||
    describe('LoginReq', function() {
 | 
			
		||||
      beforeEach(function() {
 | 
			
		||||
        instance = new SwaggerJsClient.LoginReq();
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should create an instance of LoginReq', function() {
 | 
			
		||||
        // TODO: update the code to test LoginReq
 | 
			
		||||
        expect(instance).to.be.a(SwaggerJsClient.LoginReq);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property username (base name: "username")', function() {
 | 
			
		||||
        // TODO: update the code to test the property username
 | 
			
		||||
        expect(instance).to.have.property('username');
 | 
			
		||||
        // expect(instance.username).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property password (base name: "password")', function() {
 | 
			
		||||
        // TODO: update the code to test the property password
 | 
			
		||||
        expect(instance).to.have.property('password');
 | 
			
		||||
        // expect(instance.password).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}));
 | 
			
		||||
							
								
								
									
										64
									
								
								example/clients/javascript/test/model/RegisterReq.spec.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								example/clients/javascript/test/model/RegisterReq.spec.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,64 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 
 | 
			
		||||
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 | 
			
		||||
 *
 | 
			
		||||
 * OpenAPI spec version: 
 | 
			
		||||
 *
 | 
			
		||||
 * NOTE: This class is auto generated by the swagger code generator program.
 | 
			
		||||
 * https://github.com/swagger-api/swagger-codegen.git
 | 
			
		||||
 *
 | 
			
		||||
 * Swagger Codegen version: 2.4.18
 | 
			
		||||
 *
 | 
			
		||||
 * Do not edit the class manually.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
(function(root, factory) {
 | 
			
		||||
  if (typeof define === 'function' && define.amd) {
 | 
			
		||||
    // AMD.
 | 
			
		||||
    define(['expect.js', '../../src/index'], factory);
 | 
			
		||||
  } else if (typeof module === 'object' && module.exports) {
 | 
			
		||||
    // CommonJS-like environments that support module.exports, like Node.
 | 
			
		||||
    factory(require('expect.js'), require('../../src/index'));
 | 
			
		||||
  } else {
 | 
			
		||||
    // Browser globals (root is window)
 | 
			
		||||
    factory(root.expect, root.SwaggerJsClient);
 | 
			
		||||
  }
 | 
			
		||||
}(this, function(expect, SwaggerJsClient) {
 | 
			
		||||
  'use strict';
 | 
			
		||||
 | 
			
		||||
  var instance;
 | 
			
		||||
 | 
			
		||||
  describe('(package)', function() {
 | 
			
		||||
    describe('RegisterReq', function() {
 | 
			
		||||
      beforeEach(function() {
 | 
			
		||||
        instance = new SwaggerJsClient.RegisterReq();
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should create an instance of RegisterReq', function() {
 | 
			
		||||
        // TODO: update the code to test RegisterReq
 | 
			
		||||
        expect(instance).to.be.a(SwaggerJsClient.RegisterReq);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property username (base name: "username")', function() {
 | 
			
		||||
        // TODO: update the code to test the property username
 | 
			
		||||
        expect(instance).to.have.property('username');
 | 
			
		||||
        // expect(instance.username).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property password (base name: "password")', function() {
 | 
			
		||||
        // TODO: update the code to test the property password
 | 
			
		||||
        expect(instance).to.have.property('password');
 | 
			
		||||
        // expect(instance.password).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property mobile (base name: "mobile")', function() {
 | 
			
		||||
        // TODO: update the code to test the property mobile
 | 
			
		||||
        expect(instance).to.have.property('mobile');
 | 
			
		||||
        // expect(instance.mobile).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}));
 | 
			
		||||
							
								
								
									
										76
									
								
								example/clients/javascript/test/model/UserInfoReply.spec.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								example/clients/javascript/test/model/UserInfoReply.spec.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,76 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 
 | 
			
		||||
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 | 
			
		||||
 *
 | 
			
		||||
 * OpenAPI spec version: 
 | 
			
		||||
 *
 | 
			
		||||
 * NOTE: This class is auto generated by the swagger code generator program.
 | 
			
		||||
 * https://github.com/swagger-api/swagger-codegen.git
 | 
			
		||||
 *
 | 
			
		||||
 * Swagger Codegen version: 2.4.18
 | 
			
		||||
 *
 | 
			
		||||
 * Do not edit the class manually.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
(function(root, factory) {
 | 
			
		||||
  if (typeof define === 'function' && define.amd) {
 | 
			
		||||
    // AMD.
 | 
			
		||||
    define(['expect.js', '../../src/index'], factory);
 | 
			
		||||
  } else if (typeof module === 'object' && module.exports) {
 | 
			
		||||
    // CommonJS-like environments that support module.exports, like Node.
 | 
			
		||||
    factory(require('expect.js'), require('../../src/index'));
 | 
			
		||||
  } else {
 | 
			
		||||
    // Browser globals (root is window)
 | 
			
		||||
    factory(root.expect, root.SwaggerJsClient);
 | 
			
		||||
  }
 | 
			
		||||
}(this, function(expect, SwaggerJsClient) {
 | 
			
		||||
  'use strict';
 | 
			
		||||
 | 
			
		||||
  var instance;
 | 
			
		||||
 | 
			
		||||
  describe('(package)', function() {
 | 
			
		||||
    describe('UserInfoReply', function() {
 | 
			
		||||
      beforeEach(function() {
 | 
			
		||||
        instance = new SwaggerJsClient.UserInfoReply();
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should create an instance of UserInfoReply', function() {
 | 
			
		||||
        // TODO: update the code to test UserInfoReply
 | 
			
		||||
        expect(instance).to.be.a(SwaggerJsClient.UserInfoReply);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property name (base name: "name")', function() {
 | 
			
		||||
        // TODO: update the code to test the property name
 | 
			
		||||
        expect(instance).to.have.property('name');
 | 
			
		||||
        // expect(instance.name).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property age (base name: "age")', function() {
 | 
			
		||||
        // TODO: update the code to test the property age
 | 
			
		||||
        expect(instance).to.have.property('age');
 | 
			
		||||
        // expect(instance.age).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property birthday (base name: "birthday")', function() {
 | 
			
		||||
        // TODO: update the code to test the property birthday
 | 
			
		||||
        expect(instance).to.have.property('birthday');
 | 
			
		||||
        // expect(instance.birthday).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property description (base name: "description")', function() {
 | 
			
		||||
        // TODO: update the code to test the property description
 | 
			
		||||
        expect(instance).to.have.property('description');
 | 
			
		||||
        // expect(instance.description).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property tag (base name: "tag")', function() {
 | 
			
		||||
        // TODO: update the code to test the property tag
 | 
			
		||||
        expect(instance).to.have.property('tag');
 | 
			
		||||
        // expect(instance.tag).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}));
 | 
			
		||||
							
								
								
									
										52
									
								
								example/clients/javascript/test/model/UserInfoReq.spec.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								example/clients/javascript/test/model/UserInfoReq.spec.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 
 | 
			
		||||
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 | 
			
		||||
 *
 | 
			
		||||
 * OpenAPI spec version: 
 | 
			
		||||
 *
 | 
			
		||||
 * NOTE: This class is auto generated by the swagger code generator program.
 | 
			
		||||
 * https://github.com/swagger-api/swagger-codegen.git
 | 
			
		||||
 *
 | 
			
		||||
 * Swagger Codegen version: 2.4.18
 | 
			
		||||
 *
 | 
			
		||||
 * Do not edit the class manually.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
(function(root, factory) {
 | 
			
		||||
  if (typeof define === 'function' && define.amd) {
 | 
			
		||||
    // AMD.
 | 
			
		||||
    define(['expect.js', '../../src/index'], factory);
 | 
			
		||||
  } else if (typeof module === 'object' && module.exports) {
 | 
			
		||||
    // CommonJS-like environments that support module.exports, like Node.
 | 
			
		||||
    factory(require('expect.js'), require('../../src/index'));
 | 
			
		||||
  } else {
 | 
			
		||||
    // Browser globals (root is window)
 | 
			
		||||
    factory(root.expect, root.SwaggerJsClient);
 | 
			
		||||
  }
 | 
			
		||||
}(this, function(expect, SwaggerJsClient) {
 | 
			
		||||
  'use strict';
 | 
			
		||||
 | 
			
		||||
  var instance;
 | 
			
		||||
 | 
			
		||||
  describe('(package)', function() {
 | 
			
		||||
    describe('UserInfoReq', function() {
 | 
			
		||||
      beforeEach(function() {
 | 
			
		||||
        instance = new SwaggerJsClient.UserInfoReq();
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should create an instance of UserInfoReq', function() {
 | 
			
		||||
        // TODO: update the code to test UserInfoReq
 | 
			
		||||
        expect(instance).to.be.a(SwaggerJsClient.UserInfoReq);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property id (base name: "id")', function() {
 | 
			
		||||
        // TODO: update the code to test the property id
 | 
			
		||||
        expect(instance).to.have.property('id');
 | 
			
		||||
        // expect(instance.id).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}));
 | 
			
		||||
@@ -0,0 +1,52 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 
 | 
			
		||||
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 | 
			
		||||
 *
 | 
			
		||||
 * OpenAPI spec version: 
 | 
			
		||||
 *
 | 
			
		||||
 * NOTE: This class is auto generated by the swagger code generator program.
 | 
			
		||||
 * https://github.com/swagger-api/swagger-codegen.git
 | 
			
		||||
 *
 | 
			
		||||
 * Swagger Codegen version: 2.4.18
 | 
			
		||||
 *
 | 
			
		||||
 * Do not edit the class manually.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
(function(root, factory) {
 | 
			
		||||
  if (typeof define === 'function' && define.amd) {
 | 
			
		||||
    // AMD.
 | 
			
		||||
    define(['expect.js', '../../src/index'], factory);
 | 
			
		||||
  } else if (typeof module === 'object' && module.exports) {
 | 
			
		||||
    // CommonJS-like environments that support module.exports, like Node.
 | 
			
		||||
    factory(require('expect.js'), require('../../src/index'));
 | 
			
		||||
  } else {
 | 
			
		||||
    // Browser globals (root is window)
 | 
			
		||||
    factory(root.expect, root.SwaggerJsClient);
 | 
			
		||||
  }
 | 
			
		||||
}(this, function(expect, SwaggerJsClient) {
 | 
			
		||||
  'use strict';
 | 
			
		||||
 | 
			
		||||
  var instance;
 | 
			
		||||
 | 
			
		||||
  describe('(package)', function() {
 | 
			
		||||
    describe('UserSearchReply', function() {
 | 
			
		||||
      beforeEach(function() {
 | 
			
		||||
        instance = new SwaggerJsClient.UserSearchReply();
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should create an instance of UserSearchReply', function() {
 | 
			
		||||
        // TODO: update the code to test UserSearchReply
 | 
			
		||||
        expect(instance).to.be.a(SwaggerJsClient.UserSearchReply);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property keyWord (base name: "KeyWord")', function() {
 | 
			
		||||
        // TODO: update the code to test the property keyWord
 | 
			
		||||
        expect(instance).to.have.property('keyWord');
 | 
			
		||||
        // expect(instance.keyWord).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}));
 | 
			
		||||
							
								
								
									
										52
									
								
								example/clients/javascript/test/model/UserSearchReq.spec.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								example/clients/javascript/test/model/UserSearchReq.spec.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 
 | 
			
		||||
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 | 
			
		||||
 *
 | 
			
		||||
 * OpenAPI spec version: 
 | 
			
		||||
 *
 | 
			
		||||
 * NOTE: This class is auto generated by the swagger code generator program.
 | 
			
		||||
 * https://github.com/swagger-api/swagger-codegen.git
 | 
			
		||||
 *
 | 
			
		||||
 * Swagger Codegen version: 2.4.18
 | 
			
		||||
 *
 | 
			
		||||
 * Do not edit the class manually.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
(function(root, factory) {
 | 
			
		||||
  if (typeof define === 'function' && define.amd) {
 | 
			
		||||
    // AMD.
 | 
			
		||||
    define(['expect.js', '../../src/index'], factory);
 | 
			
		||||
  } else if (typeof module === 'object' && module.exports) {
 | 
			
		||||
    // CommonJS-like environments that support module.exports, like Node.
 | 
			
		||||
    factory(require('expect.js'), require('../../src/index'));
 | 
			
		||||
  } else {
 | 
			
		||||
    // Browser globals (root is window)
 | 
			
		||||
    factory(root.expect, root.SwaggerJsClient);
 | 
			
		||||
  }
 | 
			
		||||
}(this, function(expect, SwaggerJsClient) {
 | 
			
		||||
  'use strict';
 | 
			
		||||
 | 
			
		||||
  var instance;
 | 
			
		||||
 | 
			
		||||
  describe('(package)', function() {
 | 
			
		||||
    describe('UserSearchReq', function() {
 | 
			
		||||
      beforeEach(function() {
 | 
			
		||||
        instance = new SwaggerJsClient.UserSearchReq();
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should create an instance of UserSearchReq', function() {
 | 
			
		||||
        // TODO: update the code to test UserSearchReq
 | 
			
		||||
        expect(instance).to.be.a(SwaggerJsClient.UserSearchReq);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('should have the property keyWord (base name: "keyWord")', function() {
 | 
			
		||||
        // TODO: update the code to test the property keyWord
 | 
			
		||||
        expect(instance).to.have.property('keyWord');
 | 
			
		||||
        // expect(instance.keyWord).to.be(expectedValueLiteral);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}));
 | 
			
		||||
		Reference in New Issue
	
	Block a user