public void TestErr_Eval01() { IndexerOp indexerOp = new IndexerOp(); Evaluator evalutor = new Evaluator(); Result[] argArray = new Result[1]; Result res1 = new Result(typeof(System.String), "string"); argArray[0] = res1; //Test Procedure Call Result result = indexerOp.Eval(evalutor, argArray); //Post Condition Check }
public void TestErr_Eval03() { //testing -- type obj is passed IndexerOp indexerOp = new IndexerOp(); Evaluator evalutor = new Evaluator(); Result[] argArray = new Result[2]; Result res1 = new Result(typeof(System.Int16), 4); Result res2 = new Result(typeof(System.Int16), 2); argArray[0] = res1; argArray[1] = res2; //Test Procedure Call Result result = indexerOp.Eval(evalutor, argArray); }
public void TestEval01() { IndexerOp indexerOp = new IndexerOp(); Evaluator evalutor = new Evaluator(); Result[] argArray = new Result[2]; string str = "string"; Result res1 = new Result(typeof(System.String), str); Result res2 = new Result(typeof(System.Int16), 2); argArray[0] = res1; argArray[1] = res2; //Test Procedure Call Result result = indexerOp.Eval(evalutor, argArray); //Post Condition Check Assert.AreEqual(str[2], result.Value); }
public void TestErr_Eval05() { //testing -- type obj is passed IndexerOp indexerOp = new IndexerOp(); Evaluator evalutor = new Evaluator(); Result[] argArray = new Result[2]; System.Type t = typeof(int); int[,] myIntArray = new int[1, 5] { { 1, 2, 3, 4, 5 } }; Result res1 = new Result(myIntArray); Result res2 = new Result(typeof(System.Int16), 2); argArray[0] = res1; argArray[1] = res2; //Test Procedure Call Result result = indexerOp.Eval(evalutor, argArray); }
public void TestEval02() { //Testing ---- Array type IndexerOp indexerOp = new IndexerOp(); Evaluator evalutor = new Evaluator(); Result[] argArray = new Result[2]; int[] myIntArray = new int[5] { 1, 2, 3, 4, 5 }; Result res1 = new Result(typeof(System.Array), myIntArray); Result res2 = new Result(typeof(System.Int16), 2); argArray[0] = res1; argArray[1] = res2; //Test Procedure Call Result result = indexerOp.Eval(evalutor, argArray); //Post Condition Check Assert.AreEqual(myIntArray[2], result.Value); }
public void TestEval04() { //Testing ---- PropertyInfo not null IndexerOp indexerOp = new IndexerOp(); Evaluator evalutor = new Evaluator(); Result[] argArray = new Result[2]; //MyListClass myClass = new MyListClass(); int[] myIntArray = new int[5] { 1, 2, 3, 4, 5 }; Result res1 = new Result(myIntArray); Result res2 = new Result(typeof(System.Int16), 2); argArray[0] = res1; argArray[1] = res2; //Test Procedure Call Result result = indexerOp.Eval(evalutor, argArray); //Post Condition Check //Assert.AreEqual(stringList[2], result.Value); }
public void TestEval03() { //Testing ---- Array type IndexerOp indexerOp = new IndexerOp(); Evaluator evalutor = new Evaluator(); Result[] argArray = new Result[2]; System.Collections.Generic.List <string> liststr = new System.Collections.Generic.List <string>(); liststr.Add("one"); liststr.Add("Two"); liststr.Add("Three"); Result res1 = new Result(liststr); Result res2 = new Result(typeof(System.Int16), 2); argArray[0] = res1; argArray[1] = res2; //Test Procedure Call Result result = indexerOp.Eval(evalutor, argArray); //Post Condition Check Assert.AreEqual(liststr[2], result.Value); }