Example #1
0
        public void Should_Biometric_Have_Duress_Finger()
        {
            IAbstractFactory instance = new ConcreteCreators();
            var creator = instance.CreateBiometric();

            Assert.IsTrue(creator.IsDuressFinger());
        }
Example #2
0
        public void Should_Return_The_Right_Biometric_Instance()
        {
            IAbstractFactory instance = new ConcreteCreators();
            var expectedType          = "BiometricController";
            var type = instance.CreateBiometric().GetType().Name;

            Assert.AreEqual(expectedType, type);
        }
Example #3
0
        public void Should_Get_The_Right_Biometric_Controller_By_Type()
        {
            IAbstractFactory instance = new ConcreteCreators();
            var creator       = instance.CreateBiometric();
            var expectedValue = "Door opened by biometric";

            Assert.AreEqual(expectedValue, creator.OpenDoor());
        }
Example #4
0
        public void Return_A_Family_of_Instances()
        {
            IAbstractFactory instance = new ConcreteCreators();
            var card      = "CardController";
            var biometric = "BiometricController";
            var type      = instance.CreateCard().GetType().Name;
            var type2     = instance.CreateBiometric().GetType().Name;

            Assert.AreEqual(card, type);
            Assert.AreEqual(biometric, type2);
        }