コード例 #1
0
        public void AddReturnsSumOfTwoArguments(int x, int y)
        {
            //Arrange
            var sut      = new EvalAlg(_proxyFactory);
            var expected = x + y;

            //Act
            var result = sut.Add(sut.Lit(x), sut.Lit(y));

            //Assert
            Assert.Equal(expected, result.Eval());
        }
コード例 #2
0
        public void LitReturnsArgument(int x)
        {
            //Arrange
            var sut      = new EvalAlg(_proxyFactory);
            var expected = x;

            //Act
            var result = sut.Lit(x);

            //Assert
            Assert.Equal(expected, result.Eval());
        }