예제 #1
0
        public void GetFullName_ValidParameter_ReturnLastName()
        {
            var       fullName  = string.Format("{0} {1}", "first name", "lastName");
            Affiliate affiliate = new Affiliate {
                Address = new Core.Domain.Common.Address()
                {
                    LastName = "lastName", FirstName = "first name"
                }
            };

            Assert.AreEqual(fullName, affiliate.GetFullName());
        }
예제 #2
0
        public void GetFullName_NullFirstName_ReturnLastName()
        {
            var       lastName  = "Test name";
            Affiliate affiliate = new Affiliate {
                Address = new Core.Domain.Common.Address()
                {
                    LastName = lastName
                }
            };

            Assert.AreEqual(lastName, affiliate.GetFullName());
        }
        public void GetFullName_NullLastName_ReturnFirstName()
        {
            var       firstName = "Test name";
            Affiliate affiliate = new Affiliate {
                Address = new Domain.Common.Address()
                {
                    FirstName = firstName
                }
            };

            Assert.AreEqual(firstName, affiliate.GetFullName());
        }
예제 #4
0
        public void GetFullName_NullParameter_ThrowException()
        {
            Affiliate affiliate = null;

            Assert.ThrowsException <ArgumentNullException>(() => affiliate.GetFullName());
        }