public void PersonHandler_SetName_LName_With_To_Big_FName_Test() { // Arrange // expected PersonHandler personHandler = new PersonHandler(); // Act // actual // Assert Assert.Throws <ArgumentException>(() => personHandler.SetName(person, "Berit", "1234567890123456")); }
public void PersonHandler_SetName_LName_With_null_Test() { // Arrange // expected PersonHandler personHandler = new PersonHandler(); // Act // actual // Assert Assert.Throws <ArgumentNullException>(() => personHandler.SetName(person, "Berit", null)); }
public void PersonHandler_SetName_Person_Null_Test() { // Arrange // expected PersonHandler personHandler = new PersonHandler(); // Act // actual // Assert Assert.Throws <ArgumentNullException>(() => personHandler.SetName(null, "Berit", "Nilsson")); }
public void PersonHandler_SetName_FName_With_To_Small_FName_Test() { // Arrange // expected PersonHandler personHandler = new PersonHandler(); // Act // actual // Assert Assert.Throws <ArgumentException>(() => personHandler.SetName(person, "1", "Nilsson")); }
public void PersonHandler_SetName_Test() { // Arrange // expected PersonHandler personHandler = new PersonHandler(); string strExpectedFName = "Berit"; string strExpectedLName = "Nilsson"; personHandler.SetName(person, strExpectedFName, strExpectedLName); // Act // actual string strActualFName = person.FName; string strActualLName = person.LName; // Assert Assert.AreEqual(strExpectedFName, strActualFName); Assert.AreEqual(strExpectedLName, strActualLName); }