public void makeNameTestSpecialChars() { String example = "Knowles-Carter, Beyonce "; Name name = NameUtilities.makeName(example); Assert.AreEqual(name.First, "Beyonce"); Assert.AreEqual(name.Last, "Knowles-Carter"); }
public void makeNameTestFirstLast() { String example = "Knowles, Beyonce"; Name name = NameUtilities.makeName(example); Assert.AreEqual(name.First, "Beyonce"); Assert.AreEqual(name.Last, "Knowles"); }
public void makeNameTestOnlyFirst() { // This test fails - the makeName method throws an exception // The makeName method needs to be fixed String example = "Beyonce"; Name name = NameUtilities.makeName(example); Assert.AreEqual(name.First, "Beyonce"); Assert.AreEqual(name.Last, null); }