예제 #1
0
 public static void Main( String[] args )
   {
   bool bResult = false; 
   Co3154GetTarget cb0 = new Co3154GetTarget();
   try
     {
     bResult = cb0.runTest();
     }
   catch ( System.Exception exc )
     {
     bResult = false;
     System.Console.Error.WriteLine(  "Co3154GetTarget")  ;
     System.Console.Error.WriteLine( exc.ToString() );
     }
   if ( bResult == true ) Environment.ExitCode = 0; else Environment.ExitCode = 11; 
   }
    public virtual bool runTest()
    {
        Console.Out.WriteLine("Delegate\\Co3154GetTarget runTest() started.");
        int             iCountErrors    = 0;
        int             iCountTestcases = 0;
        Co3154GetTarget cb1             = new Co3154GetTarget();
        Co3154GetTarget cb2             = new Co3154GetTarget();
        Co3154_dlg_1    dlg1            = null;
        Co3154_dlg_4    dlg4            = null;
        Object          objReturned;

        dlg1        = new Co3154_dlg_1(cb1.method1);
        objReturned = dlg1.Target;
        iCountTestcases++;
        if (!objReturned.Equals(cb1))
        {
            iCountErrors++;
            print("E_944q");
        }
        dlg1        = new Co3154_dlg_1(Co3154GetTarget.method3);
        objReturned = dlg1.Target;
        iCountTestcases++;
        if (objReturned != null)
        {
            iCountErrors++;
            print("E_871h");
        }
        dlg4        = new Co3154_dlg_4(cb1.method4);
        objReturned = dlg4.Target;
        iCountTestcases++;
        if (!objReturned.Equals(cb1))
        {
            iCountErrors++;
            print("E_471j");
        }
        if (iCountErrors == 0)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
예제 #3
0
 public virtual bool runTest()
   {
   Console.Out.WriteLine( "Delegate\\Co3154GetTarget runTest() started." );
   int iCountErrors = 0;
   int iCountTestcases = 0;
   Co3154GetTarget cb1 = new Co3154GetTarget();
   Co3154GetTarget cb2 = new Co3154GetTarget();
   Co3154_dlg_1 dlg1 = null;
   Co3154_dlg_4 dlg4 = null;
   Object objReturned;
   dlg1 = new Co3154_dlg_1(cb1.method1);
   objReturned = dlg1.Target;
   iCountTestcases++;
   if(!objReturned.Equals(cb1))
     {
     iCountErrors++;
     print("E_944q");
     }
   dlg1 = new Co3154_dlg_1(Co3154GetTarget.method3);
   objReturned = dlg1.Target;
   iCountTestcases++;
   if(objReturned != null)
     {
     iCountErrors++;
     print("E_871h");  
     }
   dlg4 = new Co3154_dlg_4(cb1.method4);
   objReturned = dlg4.Target;
   iCountTestcases++;
   if(!objReturned.Equals(cb1))
     {
     iCountErrors++;
     print("E_471j");
     }
   if ( iCountErrors == 0 ) {   return true; }
   else {  return false;}
   }
    public static void Main(String[] args)
    {
        bool            bResult = false;
        Co3154GetTarget cb0     = new Co3154GetTarget();

        try
        {
            bResult = cb0.runTest();
        }
        catch (System.Exception exc)
        {
            bResult = false;
            System.Console.Error.WriteLine("Co3154GetTarget");
            System.Console.Error.WriteLine(exc.ToString());
        }
        if (bResult == true)
        {
            Environment.ExitCode = 0;
        }
        else
        {
            Environment.ExitCode = 11;
        }
    }