Beispiel #1
0
 public void Add(Counts peer)
 {
     Rights += peer.Rights;
     Wrongs += peer.Wrongs;
     Exceptions += peer.Exceptions;
     SyntaxErrors += peer.SyntaxErrors;
 }
Beispiel #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;
 }
        public bool CanContinue(Counts counts)
        {
            if (BreakOnExceptions && counts.Exceptions > 0) return false;
            if (BreakOnWrongs && counts.Wrongs > 0) return false;

            return true;
        }
Beispiel #4
0
 public void Add(Counts peer)
 {
     Rights       += peer.Rights;
     Wrongs       += peer.Wrongs;
     Exceptions   += peer.Exceptions;
     SyntaxErrors += peer.SyntaxErrors;
 }
Beispiel #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();
        }
        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);
        }
        public bool CanContinue(Counts counts)
        {
            if (BreakOnExceptions && counts.Exceptions > 0)
            {
                return(false);
            }
            if (BreakOnWrongs && counts.Wrongs > 0)
            {
                return(false);
            }

            return(true);
        }
Beispiel #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);
 }