public void AddCommandByType_CommandNotNull_LocatorWasCalled() { bool wasCalled = false; _locator.GetCommand <IWaitableCommand>().Returns(_waitableCommand); _locator.When(locator => locator.GetCommand <TestWaitableCommand>()).Do(info => wasCalled = true); _macroCommand.AddCommand <TestWaitableCommand>(); Assert.IsTrue(wasCalled); }