Esempio n. 1
0
        public void CreateShouldThrowNotImplementedExceptionForUnknownOperand()
        {
            var unity = new UnityContainer();

            Bootstrapper.SetupContainer(unity);

            var factory = new OperationFactory(unity);

            Assert.Throws <NotImplementedException>(() => factory.Create("%"));
        }
Esempio n. 2
0
        public void CreateShouldWork(Type expectedType, string operand)
        {
            var unity = new UnityContainer();

            Bootstrapper.SetupContainer(unity);

            var factory = new OperationFactory(unity);

            var result = factory.Create(operand);

            Assert.That(result, Is.AssignableTo(expectedType));
        }
Esempio n. 3
0
        public void CreateShouldWork(Type expectedType, string operand)
        {
            var unity = new UnityContainer();
            Bootstrapper.SetupContainer(unity);

            var factory = new OperationFactory(unity);

            var result = factory.Create(operand);
            Assert.That(result, Is.AssignableTo(expectedType));
        }
Esempio n. 4
0
        public void CreateShouldThrowNotImplementedExceptionForUnknownOperand()
        {
            var unity = new UnityContainer();
            Bootstrapper.SetupContainer(unity);

            var factory = new OperationFactory(unity);
            Assert.Throws<NotImplementedException>(() => factory.Create("%"));
        }