コード例 #1
0
        public void UninitializedCommand_ShouldThrowNiceException()
        {
            var executor = new CommandExecutor(new ConfigurationContext().TypeFactory);
            var command  = new UpdateSchema.Command();

            Assert.Throws <HandlerNotFoundException>(() => executor.Execute(command));
        }
コード例 #2
0
        /// <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();
            }
        }
コード例 #3
0
        public void UninitializedCommand_ShouldThrowNiceException()
        {
            var command = new UpdateSchema.Command();

            Assert.Throws <HandlerNotFoundException>(() => command.Execute());
        }