示例#1
0
        public void White_option_is_supported()
        {
            var args = new[] { "--white", ExpectedValue };

            var parser = new PgnQueryCommandLineParser(args);

            Assert.That(parser.White, Is.EqualTo(ExpectedValue));
        }
示例#2
0
        public void Event_option_is_supported()
        {
            var args = new[] { "--event", ExpectedValue };

            var parser = new PgnQueryCommandLineParser(args);

            Assert.That(parser.Event, Is.EqualTo(ExpectedValue));
        }
示例#3
0
        public void Round_option_is_supported()
        {
            var args = new[] { "--round", ExpectedValue };

            var parser = new PgnQueryCommandLineParser(args);

            Assert.That(parser.Round, Is.EqualTo(ExpectedValue));
        }
示例#4
0
        public void Debug_flag_is_supported()
        {
            var args = new[] { "--debug" };

            var parser = new PgnQueryCommandLineParser(args);

            Assert.True(parser.Debug);
        }
示例#5
0
        public void Count_flag_is_supported()
        {
            var args = new[] { "--count" };

            var parser = new PgnQueryCommandLineParser(args);

            Assert.True(parser.CountMode);
        }
示例#6
0
        public void Json_flag_is_supported()
        {
            var args = new[] { "--json" };

            var parser = new PgnQueryCommandLineParser(args);

            Assert.True(parser.Json);
        }
示例#7
0
        public void Black_option_is_supported()
        {
            var args = new[] { "--black", ExpectedValue };

            var parser = new PgnQueryCommandLineParser(args);

            Assert.That(parser.Black, Is.EqualTo(ExpectedValue));
        }
示例#8
0
        public void Defaults_are_as_expected()
        {
            var args = new string[0];

            var parser = new PgnQueryCommandLineParser(args);

            Assert.False(parser.CountMode);
            Assert.False(parser.Debug);
            Assert.False(parser.HasErrors);
            Assert.That(parser.Event, Is.EqualTo(string.Empty));
            Assert.That(parser.Site, Is.EqualTo(string.Empty));
            Assert.That(parser.Date, Is.EqualTo(string.Empty));
            Assert.That(parser.Round, Is.EqualTo(string.Empty));
            Assert.That(parser.White, Is.EqualTo(string.Empty));
            Assert.That(parser.Black, Is.EqualTo(string.Empty));
            Assert.That(parser.Result, Is.EqualTo(string.Empty));
        }