public void GetRelativeName() { sanitized = new SanitizedPath(@"C:\lua\Weapons\Shotgun.lua"); ISanitizedPath baseDirectory = new SanitizedPath(@"C:\lua"); string relativeName = sanitized.GetRelativeName(baseDirectory); Assert.AreEqual(@"lua/Weapons/Shotgun.lua", relativeName); }
public void GetRelativeName_Passing_a_null_argument_throws_an_exception() { sanitized = new SanitizedPath(@"C:\lua\Weapons\Shotgun.lua"); TestDelegate test = delegate { sanitized.GetRelativeName(null); }; Assert.Throws<ArgumentNullException>(test); }