コード例 #1
0
        public void InstanceOf_CreatesInstance_WhenArgumentIsMissing()
        {
            IEnumerable  arg2 = Substitute.For <IEnumerable>();
            Action <int> arg3 = _ => { };

            TestClassOne testObject = Instance.Of <TestClassOne>(arg3, arg2);

            testObject.ShouldNotBeNull();
        }
コード例 #2
0
        public void InstanceOf_CreatesInstance_WhenArgumentsInAnyOrder()
        {
            ITestInterfaceOne arg1 = Substitute.For <ITestInterfaceOne>();
            IEnumerable       arg2 = Substitute.For <IEnumerable>();
            Action <int>      arg3 = _ => { };

            TestClassOne testObject = Instance.Of <TestClassOne>(arg3, arg2, arg1);

            testObject.ShouldNotBeNull();
        }
コード例 #3
0
        public void InstanceOf_CreatesInstanceWithPublicConstructor_WhenNoArgumentsSpecified()
        {
            TestClassOne testObject = Instance.Of <TestClassOne>();

            testObject.ShouldNotBeNull();
        }