Esempio n. 1
0
        public void InverseFunction_AddWithFunction_PointsEqualsMock <T> (
            T value,
            IGroup <T> group)
        {
            Func <T, T> functionMock = Substitute.For <Func <T, T> >();

            functionMock(value).Returns(value);

            var inverseFunction = group.InverseFunction(functionMock);

            var testFunction = group.Addition(inverseFunction, functionMock);

            Assert.AreEqual(group.Zero, testFunction(value));
        }