Example #1
0
        public void CreateControlFlow()
        {
            IControlFlow cflow = ControlFlowFactory.CreateControlFlow();

            Assert.IsNotNull(cflow, "The ControlFlowFactory factory class is returning a " +
                             "null IControlFlow instance (it, obviously, must not)");
        }
Example #2
0
        public void DefaultCflowIsNotUnderSomeArbitraryClass()
        {
            IControlFlow cflow   = ControlFlowFactory.CreateControlFlow();
            bool         isUnder = cflow.Under(typeof(TestObject));

            Assert.IsFalse(isUnder, string.Format(
                               "The IControlFlow implementation created by the ControlFlowFactory factory class " +
                               "would appear to have a faulty Under(Type) implementation : [{0}]", cflow.GetType()));
        }
Example #3
0
        public void DefaultCflowUnderThisTest()
        {
            IControlFlow cflow   = ControlFlowFactory.CreateControlFlow();
            bool         isUnder = cflow.Under(GetType());

            Assert.IsTrue(isUnder, string.Format(
                              "The IControlFlow implementation created by the ControlFlowFactory factory class " +
                              "would appear to have a faulty Under(Type) implementation : [{0}]", cflow.GetType()));
        }
Example #4
0
        public void CreateControlFlowReturnsDistinctInstance()
        {
            IControlFlow cflow1 = ControlFlowFactory.CreateControlFlow();
            IControlFlow cflow2 = ControlFlowFactory.CreateControlFlow();

            Assert.IsFalse(Object.ReferenceEquals(cflow1, cflow2), "The ControlFlowFactory " +
                           "factory class is not returning distinct IControlFlow instances (its always " +
                           "the same instance)");
        }
Example #5
0
        public void DefaultCflowIsNotUnderThisTestAndSomeRandomMethodName()
        {
            IControlFlow cflow   = ControlFlowFactory.CreateControlFlow();
            bool         isUnder = cflow.Under(GetType(), "PlayingYouALikeTheFoolYouAre");

            Assert.IsFalse(isUnder, string.Format(
                               "The IControlFlow implementation created by the ControlFlowFactory factory class " +
                               "would appear to have a faulty Under(Type,string) implementation : [{0}]",
                               cflow.GetType()));
        }
Example #6
0
        public void DefaultCflowIsNotUnderSomeArbitraryToken()
        {
            IControlFlow cflow   = ControlFlowFactory.CreateControlFlow();
            bool         isUnder = cflow.UnderToken("GoatsCheeseAndSoda");

            Assert.IsFalse(isUnder, string.Format(
                               "The IControlFlow implementation created by the ControlFlowFactory factory class " +
                               "would appear to have a faulty UnderToken(string) implementation : [{0}]",
                               cflow.GetType()));
        }