public void Execute_ReturnsEmpty_WhenSupposedDigitIsWrong()
        {
            var wrongDigit = new SupposedDigit <object>(1, new object());

            IEvaluationResult actual = _instance.Execute(wrongDigit);

            actual.ShouldBeOfType <EmptyEvaluationResult>();
        }
        public void Execute_ReturnsCow_WhenIndexIsWrong()
        {
            var cowDigit = new SupposedDigit <object>(1, _value);

            IEvaluationResult actual = _instance.Execute(cowDigit);

            actual.ShouldBeOfType <Cow <object> >();
        }
        public void Execute_ReturnsBull_WhenSupposedDigitIsRight()
        {
            var rightDigit = new SupposedDigit <object>(0, _value);

            IEvaluationResult actual = _instance.Execute(rightDigit);

            actual.ShouldBeOfType <Bull <object> >();
        }
        public void Execute_CallsGet_FromRepository()
        {
            var rightDigit = new SupposedDigit <object>(0, _value);

            _instance.Execute(rightDigit);

            _repository.Verify(instance => instance.Get <object>());
        }
        private void WithDigit(int index, object digit)
        {
            var secretDigit = new SupposedDigit <TValue>(index, (TValue)digit);

            _digits.Add(secretDigit);
        }
        private static ISupposedNumber <object> BuildSupposedNumber()
        {
            var supposedDigit = new SupposedDigit <object>(0, new object());

            return(new SupposedNumber <object>(new[] { supposedDigit }));
        }