Beispiel #1
0
 public void TestObjectProperties()
 {
     TestsObject.AssertNull(TestTestsObject, "TestTestsObject");
     TestTestsObject = TestsObject;
     if (TestTestsObject != TestsObject)
     {
         throw AssertionFailedException.Create(TestTestsObject, TestsObject, "TestTestsObject-Write");
     }
 }
Beispiel #2
0
        public void TestRPC()
        {
            MonoTestsStruct testStruct = new MonoTestsStruct
            {
                TestStructFloat = 108.0f,
                TestStructInt32 = 24601,
                TestSubStruct   = new MonoTestsSubStruct {
                    TestBool1 = false, TestBool2 = true
                },
            };

            ManagedServerFunction(true, "Foo", testStruct);
            string RPCFailReason = UnrealInterop.RPCGetLastFailedReason();

            TestsObject.AssertNull(RPCFailReason, "RPCFailReason");

            ManagedServerFunction(false, "Bar", testStruct);
            RPCFailReason = UnrealInterop.RPCGetLastFailedReason();
            TestsObject.AssertEqual(RPCFailReason, "ManagedServerFunction_Validate", "RPCFailReason");

            UnrealInterop.RPCResetLastFailedReason();
        }