Exemple #1
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));
        }
Exemple #2
0
        public void CreateShouldThrowNotImplementedExceptionForUnknownOperand()
        {
            var unity = new UnityContainer();
            Bootstrapper.SetupContainer(unity);

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