public void PersonTest_LastNameCorrect() { var person = new PersonDerived(1, "wahab", "syed"); person.LastName = "Brown"; Assert.Equal("Brown", person.LastName); }
public void PersonTest_FirstNameCorrect() { var person = new PersonDerived(1, "wahab", "syed"); person.FirstName = "Daniel"; Assert.Equal("Daniel", person.FirstName); }
public void PersonTest_LastNameEmpty() { var person = new PersonDerived(1); Assert.Throws <ArgumentNullException>(() => { person.LastName = ""; }); }
public void PersonCreatedWithIdAndName() { var person = new PersonDerived(1, "wahab", "syed"); Assert.Equal(1, person.Id); Assert.Equal("wahab", person.FirstName); Assert.Equal("syed", person.LastName); }
public void PersonCreatedWithInvalidLastName() { Assert.Throws <ArgumentNullException>(() => { var person = new PersonDerived(1, "wahab", ""); }); }
public void PersonCreatedWithDefaultId2() { Assert.Throws <ArgumentException>(() => { var person = new PersonDerived(default(long), "wahab", "syed"); }); }
public void PersonCreatedWithInvalidId2() { Assert.Throws <ArgumentException>(() => { var person = new PersonDerived(-1, "wahab", "syed"); }); }
public void PersonCreatedWithId1() { var person = new PersonDerived(1); Assert.Equal(1, person.Id); }
public void PersonCreatedWithInvalidId() { Assert.Throws <ArgumentException>((() => { var person = new PersonDerived(-1); })); }
public void PersonTest_FullName() { var person = new PersonDerived(1, "wahab", "syed"); Assert.Equal("wahab syed", person.FullName); }