NUnit Test Generator
Tags
Using NUnit Test Generator > Tags

The templates reside in the templates directory where NUnit Test Generator is installed.  When tests are generated each tag in the template is replaced with the appropriate values extracted from the classes that you have chosen.  The tags are case sensitive. 

There are three different scopes for the tags:

 

Tag Scope Explanation Example
KS_ASSEMBLYNAME Global Assembly Name that the class belongs to NUnitTestGenerator
KS_ASSEMBLYENGLISHNAME Global Assembly Name in English that the class belongs to NUnit Test Generator
KS_NAMESPACE Global Name space Kellerman.Business
KS_CLASSNAME Global Class Name OrderDetails
KS_CLASSVARIABLENAME Global Class Level Variable Declaration Used by All Tests _orderDetails
KS_CLASSLOCAL Global Class Local Variable Declaration Used by a Single Test orderDetails
KS_CLASSENGLISHNAME Global The Class Name with spaces inserted with Abbreviations Expanded Order Details
KS_YEAR Global The current year 2013
KS_COMPANYNAME Global The registered company name of the local machine Kellerman Software
KS_PROJECT Global The project name (the second word of the Namespace) NUnit Test Generator
KS_FILENAME Global The generated file name CustomerTest.cs
KS_DATESHORT Global The generation date in short format 10/6/13
KS_DATELONG Global The generation date in long format October 6, 2007
KS_TIMESHORT Global The generation time in short format 9:28 PM
KS_TIMELONG Global The generation time in long format 9:28:36 PM
KS_USERNAME Global The Current Logged in User Name gfinzer
KS_BEGINPROPERTIES Property Begins Property Template Block  
KS_PROPERTYNAME Property Property Name  OrderID
KS_PROPERTYENGLISHNAME Property The Property Name with spaces inserted with Abbreviations Expanded Order ID
KS_PROPERTYTYPE Property Property Type bool
KS_PROPERTYSUMMARY Property The first summary line documentation for the property The primary key
KS_PROPERTYACCESS Property If the property has a getter, setter or both Read Only, Write Only or Read/Write
KS_EXPECTEDVALUE Property The Test Generator will create appropriate values for testing properties "Test"
KS_ENDPROPERTIES Property Ends Property Template Block  
KS_BEGINMETHODS Method Begin Method Template Block  
KS_CONST Method Replaced with the word const when it is a value type const string expected
KS_METHODNAME Method Method Name SaveOrderDetails
KS_INDEX Method An index that is used when there are overridden methods SaveOrderDetailsTest2
KS_METHODENGLISHNAME Method The Method Name with spaces inserted and abbreviations expanded Save Order Details
KS_METHODSIGNATURE Method The exact method signature being tested bool SaveOrderDetails(OrderDetails details)
KS_METHODSUMMARY Method The first summary line documentation for the method Save The Order Details Object
KS_EXPECTEDDEFINITION Method Replaced with "KS_RETURNTYPE expected = KS_EXPECTEDRETURN;" bool expected = true;
KS_RESULTSDEFINITION Method Replaced with "KS_RETURNTYPE results;" bool results;
KS_PARAMETERDEFINITIONS Method Replaced "\t\t\tKS_PARAMETERTYPE KS_PARAMETERNAME = KS_PARAMETERVALUE;" for each parameter int customerId=123;
KS_RESULTS Method Replaced with "results =" or string.Empty if the method returns void results =
KS_PARAMETERVALUES Method Replaced with the local variable names for each parameter customerId, discountCustomer
KS_RETURNTYPE Method The return type of the method bool
KS_EXPECTEDRETURN Method The Test Generator will create appropriate values for testing methods TRUE
KS_ENDMETHODS Method End Method Template Block