public void InternalClassTest() { var o = new InternalTestClass(); var pi = CreatePI <int, InternalTestClass>("Int"); pi.Set(o, 50); Assert.AreEqual(50, o.Int); Assert.AreEqual(50, pi.Get(o)); }
public void IsImmutable_object_InternalTestClass() { //Arrange var validator = new ImmutableValidator(); object target = new InternalTestClass(); //Act var actual = validator.IsImmutable(target); //Assert Assert.True(actual); }
private void InternalTest() { var test1 = new InternalTestClass(); /* * can not access, * can access only public */ //test1.TestInternalFunc(); test1.PublicTestFunc(); var test3 = new ProtectedInternalTestClass(); test3.testFunction(); }
public void SimplScalarTagReprIsFieldName() { var testObj = new InternalTestClass(); testObj.ourScalar = 3; SimplTypesScope sTs = SimplTypesScope.Get("scalarTestScope", typeof(InternalTestClass)); TestMethods.TestSimplObject(testObj, sTs); var resultStream = TestMethods.TestSerialization(testObj, Format.Xml); string xmlString = resultStream.StringData; XElement xe = XElement.Parse(xmlString); Assert.IsTrue(xe.Attributes("our_scalar").Any(), "Should have an XML scalar attribute \"our_scalar\""); Assert.IsTrue(int.Parse(xe.Attribute("our_scalar").Value.ToString()) == 3, "Our scalar value should be equal to 3!"); }
public static void RunStartupTest() { try { InternalTestClass c = new InternalTestClass(); c.A = 123; c.B = "Hello"; string s = c._ObjectToJson(); if (s._InStri("Hello") == false) { throw new CoresException("s._InStri(\"Hello\") == false"); } } catch (Exception ex) { Console.WriteLine("Json.RunTest Fatal Error: " + ex.ToString()); ThreadObj.Sleep(1000); Environment.Exit(-1); } }
public InternalCompositeTestClass(int A) { this.internalComposite = new InternalTestClass(A); }
public InternalCompositeTestClass(int A) { this.internalComposite = new InternalTestClass(A); }
public void SimplScalarTagReprIsFieldName() { var testObj = new InternalTestClass(); testObj.ourScalar = 3; SimplTypesScope sTs = SimplTypesScope.Get("scalarTestScope", typeof(InternalTestClass)); TestMethods.TestSimplObject(testObj, sTs); var resultStream = TestMethods.TestSerialization(testObj, Format.Xml); string xmlString = resultStream.StringData; XElement xe = XElement.Parse(xmlString); Assert.IsTrue(xe.Attributes("our_scalar").Any(), "Should have an XML scalar attribute \"our_scalar\""); Assert.IsTrue(int.Parse(xe.Attribute("our_scalar").Value.ToString()) == 3, "Our scalar value should be equal to 3!"); }
public static void ExtensionMethod(this InternalTestClass subject) { }