UnitTest/src/Test.cs
/// <summary>
/// A code genertion tests calls the run tests the name of the output file
/// as the name of the first input file, with exe extension
/// </summary>
/// <remarks>
/// Method obtains file name based on namespace name
/// </remarks>
A code genertion tests calls the run tests the name of the output file
as the name of the first input file, with exe extension
A code genertion tests calls the run tests the name of the output file as the name of the first input file with exe extension
public void runTest()
        {
            MethodBase method = new StackTrace().GetFrame(1).GetMethod();
            Type declaringType = method.DeclaringType;
            String methodName = "";            
            if(!declaringType.Namespace.Equals("UnitTest.Tests"))
                methodName = declaringType.Namespace.Replace("UnitTest.Tests.", "");            
            methodName += "\\" + declaringType.Name + "\\" + method.Name + ".cs";
            this.runTest(new[] { TESTS_PATH + methodName });            
        }
public void runTest ( ) { MethodBase method = new StackTrace ( ) . GetFrame ( 1 ) . GetMethod ( ) ; Type declaringType = method . DeclaringType ; String methodName = " " ; if ( ! declaringType . Namespace . Equals ( " " ) ) methodName = declaringType . Namespace . Replace ( " " , " " ) ; methodName += " \\ " + declaringType . Name + " \\ " + method . Name + " " ; this . runTest ( new [ ] { TESTS_PATH + methodName } ) ; }
A code genertion tests calls the run tests the name of the output file
as the name of the first input file, with exe extension
A code genertion tests calls the run tests the name of the output file as the name of the first input file with exe extension
remarks
Method obtains file name based on namespace name
Method obtains file name based on namespace name