Exemplo n.º 1
0
		public void PrimitiveJustOut()
		{
			var A = new ActionContractA ();
			var B = new ActionContractB ();

            Tools.ConnectContractsDirectly(A, B);
		
			A.SendInt (i);
			A.SendString (str);
			A.SendIntArray (iArr);
			A.SendStringArray(strArr);
			A.SendProtobuffArray (tt);

			if (B.i != i) 
				throw new Exception ("Primitive message send failed");
			if(B.str != str)
				throw new Exception ("Primitive message send failed");
			if(!B.iArr.SequenceEqual (iArr))
				throw new Exception ("Primitive message send failed");
			if(!B.strArr.SequenceEqual (strArr))
				throw new Exception ("Primitive message send failed");
			for (int j = 0; j < tt.Length; j++)
				if(!tt[j].IsEqual(B.tt[j]))
					throw new Exception ("Primitive message send failed");
		}
Exemplo n.º 2
0
		public void ComplexJustOut()
		{
			var A = new ActionContractA ();
			var B = new ActionContractB ();

            Tools.ConnectContractsDirectly(A, B);

			A.SendVoid ();
			A.SendFixedSequence (i, d, s);
			A.SendComplexSequence (e, strArr, tt);

			if(!B.voidCalled)
				throw new Exception ("Complex message send failed");
			if(i!= B.i || d!=B.d|| s!= B.s)
				throw new Exception ("Complex message send failed");
			if(!B.strArr.SequenceEqual (strArr))
				throw new Exception ("Complex message send failed");
			for (int j = 0; j < tt.Length; j++)
				if(!tt[j].IsEqual(B.tt[j]))
					throw new Exception ("Complex message send failed");
		}