Ejemplo n.º 1
0
        public static void TestClass()
        {
            //Internal Methods available here.
            var cwpm = new ClassWithPrivateMethods();

            cwpm._doMultiply(1, 2);
        }
Ejemplo n.º 2
0
        public static void TestInterface()
        {
            //Only interface methods available here.
            IComplexOperations cwpm = new ClassWithPrivateMethods();

            cwpm.ComplexOperationsFiveAndTen();
        }
Ejemplo n.º 3
0
        public void TestVoidInstanceMethodCall()
        {
            // Arrange
            var target = new ClassWithPrivateMethods();

            // Act
            Use.Target(target).ToCall("InstanceVoidMethodWithoutArgs");

            // Assert
        }
Ejemplo n.º 4
0
        public void TestStringInstanceMethodCall()
        {
            // Arrange
            var target = new ClassWithPrivateMethods();

            // Act
            var result = Use.Target(target)
                         .ToCall <string>("InstanceStringMethodWithoutArgs");

            // Assert
            Assert.Equal("successInstanceStringMethodWithoutArgs", result);
        }
Ejemplo n.º 5
0
        public void TestDoMultiply()
        {
            var testClass = new ClassWithPrivateMethods();

            Assert.Equal(50, testClass._doMultiply(5, 10));
        }
Ejemplo n.º 6
0
        public void TestDoSum()
        {
            var testClass = new ClassWithPrivateMethods();

            Assert.Equal(15, testClass._doSum(5, 10));
        }