public void ThrowExceptionWhenDataTypeIsNotRegistered() { using (var conn = new CustomConnection()) { Action action = () => { var factory = IdGeneratorFactories.GetFactory(typeof(DateTime), conn); }; action.Should().Throw <InvalidOperationException>(); } }
public void ThrowExceptionWhenConnectionIsNotRegisterd() { using (var conn = new CustomConnection()) { Action action = () => { var factory = IdGeneratorFactories.GetFactory(conn); }; action.Should().Throw <InvalidOperationException>() .WithMessage("*CustomConnection*"); } }
public void ThrowExceptionWhenConnectionIsNotRegistered() { using (var conn = new CustomConnection()) { Action action = () => { var factory = BulkActionFactories.GetFactory(conn); }; action.Should().Throw <InvalidOperationException>() .WithMessage($"*{typeof(CustomConnection).FullName}*"); } }
public void ThrowExceptionWhenConnectionIsNotRegistered() { using (var conn = new CustomConnection()) { Action action = () => { var factory = BulkActionFactories.GetFactory(conn); }; action.ShouldThrow <InvalidOperationException>() .WithMessage($"{nameof(IBulkActionFactory)} for connection type 'CustomConnection' is not registered."); } }