// ------------------------------------------------------------------

// Iterate.cs: Represents OCL testing for Iterate expressions

// ------------------------------------------------------------------

// Project: C# and OCL Compiler

// Module:  Testing

// Author:  Dave Arnold

// Version: 1.0

// ------------------------------------------------------------------

 

// ------------------------------------------------------------------

// Imports

// ------------------------------------------------------------------

using System;

using System.Collections;

// ------------------------------------------------------------------

 

// ------------------------------------------------------------------

// DaveArnold.OCLTesting Namespace

// ------------------------------------------------------------------

namespace DaveArnold.OCLTesting

{

       // A Class to test Iterate expressions

       class IterateTests

       {

              OCL

              [

                     "context IterateTests::Iterate1() : OclVoid"

                     "pre: Set {1, 2, 3}->iterate(i : Integer; sum: Integer = 0 | sum + i) = 6"

              ]

              public void Iterate1()

              {

              }

              public void RunTests()

              {

                     Console.WriteLine("-------------- ITERATE TESTS -----------------");

                     Iterate1();

                     Console.WriteLine("I1 (Set {{1, 2, 3}}->iterate(i : Integer, sum: Integer = 0 | sum + i) = 6): PASSED");

                     Console.WriteLine("---------- ITERATE TESTS COMPLETE -----------");

              }

       }

}

 

// ------------------------------------------------------------------

// EOF