Example #1
0
        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);
        }
Example #2
0
        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);
        }