예제 #1
0
 public void Add(Counts peer)
 {
     Rights += peer.Rights;
     Wrongs += peer.Wrongs;
     Exceptions += peer.Exceptions;
     SyntaxErrors += peer.SyntaxErrors;
 }
예제 #2
0
 public bool Equals(Counts obj)
 {
     if (ReferenceEquals(null, obj)) return false;
     if (ReferenceEquals(this, obj)) return true;
     return obj.Rights == Rights && obj.Wrongs == Wrongs && obj.Exceptions == Exceptions &&
            obj.SyntaxErrors == SyntaxErrors;
 }
예제 #3
0
        public bool CanContinue(Counts counts)
        {
            if (BreakOnExceptions && counts.Exceptions > 0) return false;
            if (BreakOnWrongs && counts.Wrongs > 0) return false;

            return true;
        }
예제 #4
0
 public void Add(Counts peer)
 {
     Rights       += peer.Rights;
     Wrongs       += peer.Wrongs;
     Exceptions   += peer.Exceptions;
     SyntaxErrors += peer.SyntaxErrors;
 }
예제 #5
0
        public SpecContext(Specification specification, Timings timings, IResultObserver observer, StopConditions stopConditions, IExecutionContext execution)
        {
            Counts          = new Counts();
            Specification   = specification;
            _resultObserver = observer;
            _execution      = execution;
            StopConditions  = stopConditions;

            _timings = timings ?? new Timings();

            Reporting = new Reporting();
        }
예제 #6
0
        public static void ShouldEqual(this Counts counts, int rights, int wrongs, int exceptions, int syntaxErrors)
        {
            var expected = new Counts
            {
                Rights = rights,
                Wrongs = wrongs,
                Exceptions = exceptions,
                SyntaxErrors = syntaxErrors
            };

            counts.ShouldBe(expected);
        }
예제 #7
0
        public bool CanContinue(Counts counts)
        {
            if (BreakOnExceptions && counts.Exceptions > 0)
            {
                return(false);
            }
            if (BreakOnWrongs && counts.Wrongs > 0)
            {
                return(false);
            }

            return(true);
        }
예제 #8
0
 public bool Equals(Counts obj)
 {
     if (ReferenceEquals(null, obj))
     {
         return(false);
     }
     if (ReferenceEquals(this, obj))
     {
         return(true);
     }
     return(obj.Rights == Rights && obj.Wrongs == Wrongs && obj.Exceptions == Exceptions &&
            obj.SyntaxErrors == SyntaxErrors);
 }