Example #1
0
        public void TestValidateInvalidFile()
        {
            var opts = new Options
            {
                BSPPath = "testdata/invalidFile.bsp"
            };

            Assert.Throws <App.InvalidOptionException>(() => Program.ValidateOptions(opts));
        }
Example #2
0
        public void TestValidateValidOptions()
        {
            var opts = new Options
            {
                BSPPath   = "testdata/map.bsp",
                LumpIndex = 1
            };

            Program.ValidateOptions(opts); // Should not throw anything
        }
Example #3
0
        public void TestValidateInvalidLump()
        {
            var opts = new Options
            {
                BSPPath   = "testdata/map.bsp",
                LumpIndex = -1
            };

            Assert.Throws <App.InvalidOptionException>(() => Program.ValidateOptions(opts));

            opts.LumpIndex = 64;
            Assert.Throws <App.InvalidOptionException>(() => Program.ValidateOptions(opts));
        }