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.")); }
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.")); }
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'.")); }