Exemplo n.º 1
0
        public void WhenRelationshipIsCopied_AfterChangeInTrust_PropertiesMatch()
        {
            theRelationship.ChangeTrust(2, SuspicionScale.Average, Morality.Reciprocate);
            theRelationship.ChangeTrust(-1, SuspicionScale.Average, Morality.Reciprocate);
            theRelationship.ChangeTrust(1, SuspicionScale.Average, Morality.Reciprocate);
            var theCopy = theRelationship.Copy();

            Assert.IsTrue(theRelationship != theCopy); //distinct objects/pointers
            Assert.AreEqual(theRelationship.SelfId, theCopy.SelfId);
            Assert.AreEqual(theRelationship.OtherId, theCopy.OtherId);
            Assert.AreEqual(theRelationship.Trust, theCopy.Trust);
            Assert.AreEqual(theRelationship.Ethics, theCopy.Ethics);
            Assert.AreEqual(theRelationship.DurabilityOfEthics, theCopy.DurabilityOfEthics);
            Assert.AreEqual(theRelationship.DurabilityOfTrust, theCopy.DurabilityOfTrust);
        }