Exemplo n.º 1
0
 internal override void Implies(CommandCondition c)
 {
     if (!ShouldVerify)
     {
         return;
     }
     if (c == CommandCondition.ExactlyOne)
     {
         if (_min.GetValueOrDefault(1) != 1 || _max.GetValueOrDefault(1) != 1)
         {
             throw SpecFailure.ExactlyOnePlural();
         }
     }
     else if (c == CommandCondition.NotOneButZeroOrMore)
     {
         if (_min.GetValueOrDefault(1) == 1 && _max.GetValueOrDefault(1) == 1)
         {
             throw SpecFailure.ExactlyOneSingular();
         }
     }
 }