public void nulltest2 ()
		{
			ScriptMethodDescriptor sd = new ScriptMethodDescriptor ("methodName", null);

			Assert.IsNotNull (sd.Parameters, "A1");
			Assert.AreEqual (0, sd.Parameters.Length, "A2");
		}
		public void ctor1 ()
		{
			ScriptMethodDescriptor sd = new ScriptMethodDescriptor ("methodName");
			Assert.AreEqual ("methodName", sd.MethodName, "A1");
			Assert.AreEqual ("methodName", sd.MemberName, "A2");
			Assert.IsNotNull (sd.Parameters, "A3");
			Assert.AreEqual (0, sd.Parameters.Length, "A4");
		}
Beispiel #3
0
 protected void DoMethod(ScriptMethodDescriptor m, string methodName, string[] args)
 {
     Assert.AreEqual(methodName, m.MethodName, methodName + " MethodName");
     Assert.AreEqual(methodName, m.MemberName, methodName + " MemberName");
     Assert.AreEqual(args.Length, m.Parameters.Length, methodName + " Parameter count");
     for (int i = 0; i < args.Length; i++)
     {
         Assert.AreEqual(args[i], m.Parameters[i], methodName + " Parameter " + i.ToString());
     }
 }
		public void ctor2 ()
		{
			string[] args = new string[2];
			args[0] = "arg1";
			args[1] = "arg2";

			ScriptMethodDescriptor sd = new ScriptMethodDescriptor ("methodName", args);
			Assert.AreEqual ("methodName", sd.MethodName, "A1");
			Assert.AreEqual ("methodName", sd.MemberName, "A2");
			Assert.IsNotNull (sd.Parameters, "A3");
			Assert.AreEqual (2, sd.Parameters.Length, "A4");
			Assert.AreEqual ("arg1", sd.Parameters[0], "A5");
			Assert.AreEqual ("arg2", sd.Parameters[1], "A6");
		}
Beispiel #5
0
 void DoMethod(ScriptMethodDescriptor m, string methodName, string[] args)
 {
     Assert.AreEqual(methodName, m.MethodName, methodName + " MethodName");
     Assert.AreEqual(methodName, m.MemberName, methodName + " MemberName");
     Assert.AreEqual(args.Length, m.Parameters.Length, methodName + " Parameter count");
 }
		public void nulltest1 ()
		{
			ScriptMethodDescriptor sd = new ScriptMethodDescriptor (null);
		}