Esempio n. 1
0
        public void TestMethod1()
        {
            var accept  = new AcceptClass("1", "2", "3", "4", "5", "6", "7", "8", "9");
            var acceptC = CloneableAttribute.Clone(accept,
                                                   new AcceptClass("", "", "", "", "", "", "", "", ""));

            Assert.AreEqual(accept.GetPublicProperty(), acceptC.GetPublicProperty());
            Assert.AreEqual(accept.GetProtectedProperty(), acceptC.GetProtectedProperty());
            Assert.AreEqual(accept.GetPrivateProperty(), acceptC.GetPrivateProperty());
            Assert.AreEqual(accept.GetPublicField(), acceptC.GetPublicField());
            Assert.AreEqual(accept.GetProtectedField(), acceptC.GetProtectedField());
            Assert.AreEqual(accept.GetPrivateFirld(), acceptC.GetPrivateFirld());
            Assert.AreEqual(accept.GetPublicReadonlyField(), acceptC.GetPublicReadonlyField());
            Assert.AreEqual(accept.GetProtectedReadonlyField(), acceptC.GetProtectedReadonlyField());
            Assert.AreEqual(accept.GetPrivateReadonlyFirld(), acceptC.GetPrivateReadonlyFirld());
        }
        public void TestMethod1()
        {
            var accept = new AcceptClass("1", "2", "3", "4", "5", "6", "7", "8", "9");
            var acceptC = CloneableAttribute.Clone(accept,
                new AcceptClass("", "", "", "", "", "", "", "", ""));

            Assert.AreEqual(accept.GetPublicProperty(), acceptC.GetPublicProperty());
            Assert.AreEqual(accept.GetProtectedProperty(), acceptC.GetProtectedProperty());
            Assert.AreEqual(accept.GetPrivateProperty(), acceptC.GetPrivateProperty());
            Assert.AreEqual(accept.GetPublicField(), acceptC.GetPublicField());
            Assert.AreEqual(accept.GetProtectedField(), acceptC.GetProtectedField());
            Assert.AreEqual(accept.GetPrivateFirld(), acceptC.GetPrivateFirld());
            Assert.AreEqual(accept.GetPublicReadonlyField(), acceptC.GetPublicReadonlyField());
            Assert.AreEqual(accept.GetProtectedReadonlyField(), acceptC.GetProtectedReadonlyField());
            Assert.AreEqual(accept.GetPrivateReadonlyFirld(), acceptC.GetPrivateReadonlyFirld());
        }