Exemplo n.º 1
0
        public void Constructor_AddInWithEmptyExecutors_ThrowsCliException()
        {
            // Arrange

            // Act
            var   addIn = new AddInWithBadBehaviour(AddInWithBadBehaviour.BadBehaviour.EmptyExecutors);
            INode dummy;
            var   ex = Assert.Throws <CliException>(() => dummy = addIn.Node);

            // Assert
            Assert.That(ex.Message, Is.EqualTo("'CreateExecutors' must not return empty collection."));
        }
Exemplo n.º 2
0
        public void GetHelp_AddInWithoutName_ThrowsCliException()
        {
            // Arrange

            // Act
            var    addIn = new AddInWithBadBehaviour(AddInWithBadBehaviour.BadBehaviour.EmptyExecutors);
            string help;
            var    ex = Assert.Throws <CliException>(() => help = addIn.GetHelp());

            // Assert
            Assert.That(ex.Message, Is.EqualTo("Help is not supported."));
        }
Exemplo n.º 3
0
        public void Constructor_AddInWithCustomExecutors_ThrowsCliException()
        {
            // Arrange

            // Act
            var   addIn = new AddInWithBadBehaviour(AddInWithBadBehaviour.BadBehaviour.CustomExecutor);
            INode dummy;
            var   ex = Assert.Throws <CliException>(() => dummy = addIn.Node);

            // Assert
            Assert.That(ex.Message, Is.EqualTo("'CreateExecutors' must return instances of type 'TauCode.Cli.CliExecutorBase'."));
        }