csharp.model_test.mustache Maven / Gradle / Ivy
using NUnit.Framework;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using {{packageName}}.Api;
using {{packageName}}.Model;
using {{packageName}}.Client;
using System.Reflection;
{{#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
    {
        private {{classname}} instance;
        /// 
        /// Setup before each test
        ///  
        [SetUp]
        public void Init()
        {
            instance = new {{classname}}();
        }
    
        /// 
        /// Clean up after each test
        ///  
        [TearDown]
        public void Cleanup()
        {
        }   
        /// 
        /// Test an instance of {{classname}}
        ///  
        [Test]
        public void {{classname}}InstanceTest()
        {
            Assert.IsInstanceOf<{{classname}}> (instance, "instance is a {{classname}}");
        }
        {{#vars}}
        /// 
        /// Test the property '{{name}}' 
        ///  
        [Test]
        public void {{name}}Test()
        {
            // TODO: unit test for the property '{{name}}' 
        }
        {{/vars}}
    }
}
{{/model}}
{{/models}}
    © 2015 - 2025 Weber Informatics LLC | Privacy Policy