public void CreateShouldThrowNotImplementedExceptionForUnknownOperand() { var unity = new UnityContainer(); Bootstrapper.SetupContainer(unity); var factory = new OperationFactory(unity); Assert.Throws <NotImplementedException>(() => factory.Create("%")); }
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)); }
public void CreateShouldThrowNotImplementedExceptionForUnknownOperand() { var unity = new UnityContainer(); Bootstrapper.SetupContainer(unity); var factory = new OperationFactory(unity); Assert.Throws<NotImplementedException>(() => factory.Create("%")); }