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

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

            return(true);
        }
Ejemplo n.º 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);
 }