コード例 #1
0
        public void RaiseExecutingTest()
        {
            var executorAttr = new CacheAttribute("group") as IExecutorAttribute;

            Assert.True(Assert.Throws <NotSupportedException>(() => executorAttr.RaiseExecuting(null, new Command1())).Message.EndsWith(":命令模型没有实现缓存接口。"));
            Assert.True(Assert.Throws <NotSupportedException>(() => executorAttr.RaiseExecuting(null, new Command2()
            {
                NullStrategy = true
            })).Message.EndsWith(":命令模型返回了无效的策略信息。"));
            Assert.True(Assert.Throws <NotSupportedException>(() => executorAttr.RaiseExecuting(null, new Command2()
            {
                NullStrategy = false
            })).Message.EndsWith(":命令模型返回了无效的策略信息。"));
        }
コード例 #2
0
        public void RaiseExecutedTest()
        {
            var executorAttr = new CacheAttribute("group") as IExecutorAttribute;

            executorAttr.RaiseExecuted(null, null, new Exception());
        }