Ejemplo n.º 1
0
        public ValidatorShould()
        {
            var opts = Options.Create(new IrcBotConfiguration
            {
                CommandPrefix = ".cb "
            });
            var builder = new MockOrchestratorBuilder();

            builder.RegisterProcessor <TestProcessor>();
            builder.AddChannelPolicy("noMain", new string[] { "#main" }, ChannelPolicy.PolicyMode.Blacklist);
            builder.AddChannelPolicy("onlyMain", new string[] { "#main" }, ChannelPolicy.PolicyMode.Whitelist);
            orchestrator = new CommandOrchestratorRule(opts, builder, new MockProcessorProvider <TestProcessor>());
        }
Ejemplo n.º 2
0
        public void Throw_On_Bad_Return()
        {
            var builder = new MockOrchestratorBuilder();

            Assert.Throws <ArgumentException>(() => builder.RegisterProcessor <BadReturnProcessor>());
        }
Ejemplo n.º 3
0
        public void Allow_IClientMessage_Return_Types()
        {
            var builder = new MockOrchestratorBuilder();

            builder.RegisterProcessor <ReturnTestProcessor>();
        }
Ejemplo n.º 4
0
        public void Thow_On_Duplicate_Command()
        {
            var builder = new MockOrchestratorBuilder();

            Assert.Throws <DuplicateCommandException>(() => builder.RegisterProcessor <DuplicateCommandProcessor>());
        }