Esempio n. 1
0
        public void TestClone()
        {
            CustomerProps props2 = (CustomerProps)props1.Clone();

            Assert.NotNull(props2);
            props1.name = "Larson";
            Assert.AreNotEqual(props1.name, props2.name);
            Assert.AreNotSame(props1, props2);
        }
Esempio n. 2
0
        public void TestClone()
        {
            // Clones props1 and casts it to CustomerProps type
            CustomerProps props2 = (CustomerProps)props1.Clone();

            Assert.NotNull(props2);
            props1.name = "Minnie";
            Assert.AreNotEqual(props2.name, props1.name);
            Assert.AreNotSame(props2, props1);
        }
Esempio n. 3
0
        public void TestClone()
        {
            CustomerProps clone = (CustomerProps)p.Clone();

            Assert.NotNull(clone);

            p.name = "Che";

            Assert.AreNotEqual(p.name, clone.name);
            Assert.AreNotSame(p, clone);
        }
Esempio n. 4
0
        public void TestClone()
        {
            CustomerProps newC = (CustomerProps)c.Clone();

            Assert.AreEqual(c.ID, newC.ID);
            Assert.AreEqual(c.Name, newC.Name);
            Assert.AreEqual(c.Address, newC.Address);
            Assert.AreEqual(c.City, newC.City);
            Assert.AreEqual(c.State, newC.State);
            Assert.AreEqual(c.ZipCode, newC.ZipCode);
            Assert.AreEqual(c.ConcurrencyID, newC.ConcurrencyID);
        }
Esempio n. 5
0
        public void CloneTest()
        {
            CustomerProps cloneProps = (CustomerProps)props.Clone();

            Assert.AreEqual(props.ID, cloneProps.ID);
            Assert.AreEqual(props.name, cloneProps.name);
            Assert.AreEqual(props.address, cloneProps.address);
            Assert.AreEqual(props.city, cloneProps.city);
            Assert.AreEqual(props.state, cloneProps.state);
            Assert.AreEqual(props.zipCode, cloneProps.zipCode);
            Assert.AreEqual(props.ConcurrencyID, cloneProps.ConcurrencyID);
        }
Esempio n. 6
0
        public void CloneTest()
        {
            CustomerProps props2;

            props2 = (CustomerProps)props.Clone();
            Assert.AreEqual(props.ID, props2.ID);
            Assert.AreEqual(props.name, props2.name);
            Assert.AreEqual(props.address, props2.address);
            Assert.AreEqual(props.city, props2.city);
            Assert.AreEqual(props.state, props2.state);
            Assert.AreEqual(props.zipCode, props2.zipCode);
            Assert.AreEqual(props.ConcurrencyID, props2.ConcurrencyID);
        }
Esempio n. 7
0
        public void TestClone()
        {
            // must cast to CustomerProps because Clone() returns an object
            CustomerProps props2 = (CustomerProps)props1.Clone();

            Assert.NotNull(props2);

            // change props1 name to "Goofy"
            props1.name = "Goofy";

            Assert.AreNotEqual(props1.name, props2.name);
            Assert.AreNotSame(props1, props2);
        }
        public void TestClone()
        {
            CustomerProps c2 = (CustomerProps)c.Clone();

            Assert.AreEqual(c.ID, c2.ID);
            Assert.AreEqual(c.name, c2.name);
            Assert.AreEqual(c.address, c2.address);
            Assert.AreEqual(c.city, c2.city);
            Assert.AreEqual(c.state, c2.state);
            Assert.AreEqual(c.zip, c2.zip);
            Assert.AreEqual(c.ConcurrencyID, c2.ConcurrencyID);
            c2.name = "Jim";
            Assert.AreNotEqual(c.name, c2.name);
        }
Esempio n. 9
0
        //test the methods we wrote
        public void TestClone()
        {
            CustomerProps c2 = (CustomerProps)testc.Clone();

            //assert that areEqual all the properties
            Assert.AreEqual(testc.customerID, c2.customerID);
            Assert.AreEqual(testc.name, c2.name);
            Assert.AreEqual(testc.address, c2.address);
            Assert.AreEqual(testc.city, c2.city);
            Assert.AreEqual(testc.state, c2.state);
            Assert.AreEqual(testc.zipCode, c2.zipCode);
            Assert.AreEqual(testc.concurrencyID, c2.concurrencyID);

            testc.customerID = 4;
            Assert.AreNotEqual(testc.customerID, c2.customerID);
        }
Esempio n. 10
0
        public void TestClone()
        {
            CustomerProps newC = (CustomerProps)c.Clone();

            Assert.IsTrue(c.name == newC.name);
        }