All Downloads are FREE. Search and download functionalities are using the official Maven repository.

handlebars.csharp.model_test.mustache Maven / Gradle / Ivy

There is a newer version: 1.0.48
Show newest version
{{>partial_header}}

using NUnit.Framework;

using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using {{packageName}}.{{apiPackage}};
using {{packageName}}.{{modelPackage}};
using {{packageName}}.Client;
using System.Reflection;
using Newtonsoft.Json;

{{#models}}
{{#model}}
namespace {{packageName}}.Test
{
    /// 
    ///  Class for testing {{classname}}
    /// 
    /// 
    /// This file is automatically generated by Swagger Codegen.
    /// Please update the test case below to test the model.
    /// 
    [TestFixture]
    public class {{classname}}Tests
    {
        // TODO uncomment below to declare an instance variable for {{classname}}
        //private {{classname}} instance;

        /// 
        /// Setup before each test
        /// 
        [SetUp]
        public void Init()
        {
            // TODO uncomment below to create an instance of {{classname}}
            //instance = new {{classname}}();
        }

        /// 
        /// Clean up after each test
        /// 
        [TearDown]
        public void Cleanup()
        {

        }

        /// 
        /// Test an instance of {{classname}}
        /// 
        [Test]
        public void {{classname}}InstanceTest()
        {
            // TODO uncomment below to test "IsInstanceOfType" {{classname}}
            //Assert.IsInstanceOfType<{{classname}}> (instance, "variable 'instance' is a {{classname}}");
        }

        {{#discriminator}}
        {{#children}}
        /// 
        /// Test deserialize a {{classname}} from type {{parent}}
        /// 
        [Test]
        public void {{classname}}DeserializeFrom{{parent}}Test()
        {
            // TODO uncomment below to test deserialize a {{classname}} from type {{parent}}
            //Assert.IsInstanceOf<{{parent}}>(JsonConvert.DeserializeObject<{{parent}}>(new {{classname}}().ToJson()));
        }
        {{/children}}
        {{/discriminator}}

        {{#vars}}
        /// 
        /// Test the property '{{name}}'
        /// 
        [Test]
        public void {{name}}Test()
        {
            // TODO unit test for the property '{{name}}'
        }
        {{/vars}}

    }

}
{{/model}}
{{/models}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy