public void UninitializedCommand_ShouldThrowNiceException() { var executor = new CommandExecutor(new ConfigurationContext().TypeFactory); var command = new UpdateSchema.Command(); Assert.Throws <HandlerNotFoundException>(() => executor.Execute(command)); }
/// <summary> /// Updates the underlying storage schema. /// </summary> public void UpdateStorageSchema() { var command = new UpdateSchema.Command(); if (!command.CanBeExecuted()) { throw new InvalidOperationException("Resource sync handler is not registered. Make sure that storage provider is registered e.g. ctx.UseSqlServer(..)"); } if (!_synced) { command.Execute(); } }
public void UninitializedCommand_ShouldThrowNiceException() { var command = new UpdateSchema.Command(); Assert.Throws <HandlerNotFoundException>(() => command.Execute()); }