Example #1
0
 public void FlagSegment_with_value_should_return_value()
 {
     var segment = new FlagSegment("[-f|flag]");
     var match = segment.Match("-f value");
     Assert.IsType<NamedValueMatchResult>(match);
     Assert.Equal("value", (string)((NamedValueMatchResult)match).Value);
 }
Example #2
0
 public void FlagSegment_without_value_should_return_true()
 {
     var segment = new FlagSegment("[-f|flag]");
     var match = segment.Match("-f");
     Assert.IsType<NamedValueMatchResult>(match);
     Assert.Equal(true, (bool) ((NamedValueMatchResult) match).Value);
 }
Example #3
0
 public void FlagSegment_should_be_named()
 {
     var segment = new FlagSegment("[-f|flag]");
     var match = segment.Match("-f value");
     Assert.IsType<NamedValueMatchResult>(match);
     Assert.Equal("flag", ((NamedValueMatchResult)match).Name);
 }
Example #4
0
        public void FlagSegment_with_value_should_return_value()
        {
            var segment = new FlagSegment("[-f|flag]");
            var match   = segment.Match("-f value");

            Assert.IsType <NamedValueMatchResult>(match);
            Assert.Equal("value", (string)((NamedValueMatchResult)match).Value);
        }
Example #5
0
        public void FlagSegment_without_value_should_return_true()
        {
            var segment = new FlagSegment("[-f|flag]");
            var match   = segment.Match("-f");

            Assert.IsType <NamedValueMatchResult>(match);
            Assert.Equal(true, (bool)((NamedValueMatchResult)match).Value);
        }
Example #6
0
        public void FlagSegment_should_be_named()
        {
            var segment = new FlagSegment("[-f|flag]");
            var match   = segment.Match("-f value");

            Assert.IsType <NamedValueMatchResult>(match);
            Assert.Equal("flag", ((NamedValueMatchResult)match).Name);
        }
Example #7
0
        public void Should_not_match_flag_segment(string segmentText, string commandText)
        {
            var segment = new FlagSegment(segmentText);

            Assert.Null(segment.Match(commandText));
        }
Example #8
0
 public void Should_not_match_flag_segment(string segmentText, string commandText)
 {
     var segment = new FlagSegment(segmentText);
     Assert.Null(segment.Match(commandText));
 }
Example #9
0
 public void FlagPoleGrabbing(FlagSegment flagSegment)
 {
 }
Example #10
0
 public void FlagPoleGrabbing(FlagSegment flagSegment)
 {
     AddPoints(flagSegment.GetPoints());
 }