コード例 #1
0
        public void AddOperad_Should_AddOperadToList_When_ArgumentNotNull()
        {
            var operandStub         = new Mock <IOperand>();
            var binaryOperationFake = new BinaryOperationFake();

            binaryOperationFake.AddOperand(operandStub.Object);

            Assert.IsTrue(binaryOperationFake.OperationContainsOperand(operandStub.Object));
        }
コード例 #2
0
        public void Result_Should_InvokeApplyOperation_When_IsCompleReturnsTrue()
        {
            var operand = new Mock <IOperand>();

            var binaryOperationFake = new BinaryOperationFake();

            binaryOperationFake.AddOperand(operand.Object);
            binaryOperationFake.AddOperand(operand.Object);

            Assert.ThrowsException <NotImplementedException>(() => binaryOperationFake.Result);
        }