public void FakesStubInvocation()
        {
            var mathStub = new StubIMath();

            mathStub.MultiplyInt32Int32 = (a, b) => 15;
            var randomStub = new StubIRandomGenerator();

            var number = new Number(mathStub, randomStub, 5);
            var result = number.MultiplyBy(3);

            Assert.AreEqual(15, result.Value);
        }
Example #2
0
        public void FakesStubInvocation()
        {
            var mathStub   = new StubIMath();
            var randomStub = new StubIRandomGenerator();

            var number  = new Number(mathStub, randomStub, 5);
            var number2 = new StubINumber();

            number2.ValueGet = () => 5;

            Assert.IsTrue(number.Equals(number2));
        }