コード例 #1
0
        public void setPhoneTest()
        {
            Attendee a = new Attendee();

            a.setPhone("(336)444-1234");

            Assert.AreEqual("(336)444-1234", a.getPhone());
        }
コード例 #2
0
        public void loadedConstructorTest()
        {
            Attendee a = new Attendee(60, "Bob", "Jones", "The Great Company", "*****@*****.**", "(704)555-6789");

            Assert.AreEqual(60, a.getId());
            Assert.AreEqual("Bob", a.getFirstName());
            Assert.AreEqual("Jones", a.getLastName());
            Assert.AreEqual("The Great Company", a.getCompany());
            Assert.AreEqual("*****@*****.**", a.getEmail());
            Assert.AreEqual("(704)555-6789", a.getPhone());
        }
コード例 #3
0
        public void constructorTest()
        {
            Attendee a = new Attendee();

            Assert.AreEqual(0, a.getId());
            Assert.AreEqual(null, a.getFirstName());
            Assert.AreEqual(null, a.getLastName());
            Assert.AreEqual(null, a.getCompany());
            Assert.AreEqual(null, a.getEmail());
            Assert.AreEqual(null, a.getPhone());
        }