public void PersonHandler_CreatePerson_FName_Null_Test() { // Arrange // expected PersonHandler personHandler = new PersonHandler(); //Person newPerson = personHandler.CreatePerson(33, "Stina", "Andersson", 165.5, 62.5); // Act // actual Assert.Throws <ArgumentNullException>(() => personHandler.CreatePerson(33, null, "Andersson", 165.5, 62.5)); }
public void PersonHandler_CreatePerson_LName_To_Big_Test() { // Arrange // expected PersonHandler personHandler = new PersonHandler(); //Person newPerson = personHandler.CreatePerson(33, "Stina", "Andersson", 165.5, 62.5); // Act // actual Assert.Throws <ArgumentException>(() => personHandler.CreatePerson(33, "Stina", "1234567890123456", 165.5, 62.5)); }
public void PersonHandler_CreatePerson_Wrong_Age_Test() { // Arrange // expected PersonHandler personHandler = new PersonHandler(); //Person newPerson = personHandler.CreatePerson(0, "Stina", "Andersson", 165.5, 62.5); // Act // actual Assert.Throws <ArgumentException>(() => personHandler.CreatePerson(0, "Stina", "Andersson", 165.5, 62.5)); }
public void PersonHandler_CreatePerson_Test() { // Arrange // expected PersonHandler personHandler = new PersonHandler(); Person newPerson = personHandler.CreatePerson(33, "Stina", "Andersson", 165.5, 62.5); // Act // actual // Assert Assert.AreEqual(33, newPerson.Age); Assert.AreEqual("Stina", newPerson.FName); Assert.AreEqual("Andersson", newPerson.LName); Assert.AreEqual(165.5, newPerson.Height); Assert.AreEqual(62.5, newPerson.Weight); }