Example #1
0
 //public TestService(ICareUow uow, TestLogicFactory factory, IQuestionGenerator questionGenerator)
 public TestService(ICareUow uow, TestLogicFactory factory)
 {
     if (uow == null || factory == null)
     {
         throw new ArgumentNullException("uow or factory");
     }
     //this.qGen = questionGenerator;
     this.factory = factory;
     this.uow = uow;
     //this.tLogic = tLogic;
 }
Example #2
0
 //public TestService(ICareUow uow, TestLogicFactory factory, IQuestionGenerator questionGenerator)
 public TestService(ICareUow uow, TestLogicFactory factory)
 {
     if (uow == null || factory == null)
     {
         throw new ArgumentNullException("uow or factory");
     }
     //this.qGen = questionGenerator;
     this.factory = factory;
     this.uow     = uow;
     //this.tLogic = tLogic;
 }
Example #3
0
        public void TestLogicFactory_Can_CreateTestLogicInstance()
        {
            //Arrange
            //method args = string testType
            bool result = false;
            string sysrTestType = "Sysr";
            string mapsTestType = "Maps";

            TestLogicFactory target = new TestLogicFactory();

            //Act
            ITestLogic testLogic1 = target.CreateTestLogicInstance(sysrTestType);
            ITestLogic testLogic2 = target.CreateTestLogicInstance(mapsTestType);
            if (testLogic1 is SysrTestLogic)
            {
                if (testLogic2 is MapsTestLogic)
                {
                    result = true;
                }
            }

            //Assert
            Assert.IsTrue(result);
        }