private void AssertBuildCommandProperties(IBounceCommand command) { Assert.That(command.PastTense, Is.EqualTo("built")); Assert.That(command.PresentTense, Is.EqualTo("building")); Assert.That(command.InfinitiveTense, Is.EqualTo("build")); bool built = false; command.InvokeCommand(() => built = true, () => Assert.Fail("didn't expect this to be invoked"), () => Assert.Fail("didn't expect this to be invoked")); Assert.That(built); }
private void AssertDescribeCommandProperties(IBounceCommand command) { Assert.That(command.CommandLineCommand, Is.EqualTo("describe")); Assert.That(command.PastTense, Is.EqualTo("described")); Assert.That(command.PresentTense, Is.EqualTo("describing")); Assert.That(command.InfinitiveTense, Is.EqualTo("describe")); bool described = false; command.InvokeCommand(() => Assert.Fail("didn't expect this to be invoked"), () => Assert.Fail("didn't expect this to be invoked"), () => described = true); Assert.That(described); }
private void AssertCleanCommandProperties(IBounceCommand command) { Assert.That(command.CommandLineCommand, Is.EqualTo("clean")); Assert.That(command.PastTense, Is.EqualTo("cleaned")); Assert.That(command.PresentTense, Is.EqualTo("cleaning")); Assert.That(command.InfinitiveTense, Is.EqualTo("clean")); bool cleaned = false; command.InvokeCommand(() => Assert.Fail("didn't expect this to be invoked"), () => cleaned = true, () => Assert.Fail("didn't expect this to be invoked")); Assert.That(cleaned); }
public void Invoke(IBounceCommand command, IObsoleteTask task) { command.InvokeCommand(() => Build(task, command), () => Clean(task, command), () => Describe(task, command)); }
public virtual void Invoke(IBounceCommand command, IBounce bounce) { command.InvokeCommand(() => Build(bounce), () => Clean(bounce), () => Describe(bounce)); }