示例#1
0
        public void TestPersonConstructorWithData()
        {
            string aFirstName = "FirstName";
            string aSecondName = "SeconName";
            string aStreet = "Street";
            string aNumber = "Number";
            string aCity = "City";
            string aCountry = "Country";
            string aPostalCode = "PostalCode";
            string aTlf = "TLF";
            string aMobile = "Mobile";
            string anEMail = "eMail";

            Address anAddress = new Address(aStreet, aNumber, aCity, aCountry, aPostalCode);
            Person aPerson = new Person(aFirstName,aSecondName,anAddress,aTlf,aMobile,anEMail);

            Assert.AreEqual(aFirstName, aPerson.FirstName);
            Assert.AreEqual(aSecondName, aPerson.SecondName);
            Assert.AreEqual(aStreet, aPerson.Address.Street);
            Assert.AreEqual(aNumber, aPerson.Address.Number);
            Assert.AreEqual(aCity, aPerson.Address.City);
            Assert.AreEqual(aCountry, aPerson.Address.Country);
            Assert.AreEqual(aPostalCode, aPerson.Address.PostalCode);
            Assert.AreEqual(aTlf, aPerson.Tlf);
            Assert.AreEqual(aMobile, aPerson.Mobile);
            Assert.AreEqual(anEMail, aPerson.EMail);
        }
示例#2
0
 public void CopyPerson(Person aPerson)
 {
     this.FirstName = aPerson.FirstName;
     this.SecondName = aPerson.SecondName;
     this.Address = aPerson.Address;
     this.Tlf = aPerson.Tlf;
     this.Mobile = aPerson.Mobile;
     this.EMail = aPerson.EMail;
 }
示例#3
0
        public void TestPersonConstructorWithoutData()
        {
            string aFirstName = null;
            string aSecondName = null;
            string aTlf = null;
            string aMobile = null;
            string anEMail = null;

            Person aPerson = new Person();

            Assert.AreEqual(aFirstName, aPerson.FirstName);
            Assert.AreEqual(aSecondName, aPerson.SecondName);
            Assert.AreEqual(null, aPerson.Address);
            Assert.AreEqual(aTlf, aPerson.Tlf);
            Assert.AreEqual(aMobile, aPerson.Mobile);
            Assert.AreEqual(anEMail, aPerson.EMail);
        }