public void RemoveAccount() { var accountName = new AccountName("Account"); _accountCollection.GetOrCreate(accountName); Assert.IsTrue(_accountCollection.Any(c => c.Name == accountName.Value)); _accountHandler.Handle(new AccountRemovedMessage(accountName.Value)); _accountHandler.Handle(_bus.PluginCommands.OfType<AccountRemovedLastStepMessage>().Single()); Assert.IsFalse(_accountCollection.Any(c => c.Name == accountName.Value)); }
public void RemoveAccount(RoutableTransportMode mode, bool isQueueDelete) { _msmqTransport.RoutableTransportMode = mode; var accountName = new AccountName("Account"); _accountCollection.GetOrCreate(accountName); Assert.IsTrue(_accountCollection.Any(c => c.Name == accountName.Value)); _accountHandler.Handle(new AccountRemovedMessage(accountName.Value)); _accountHandler.Handle(_bus.PluginCommands.OfType <AccountRemovedLastStepMessage>().Single()); Assert.IsFalse(_accountCollection.Any(c => c.Name == accountName.Value)); Assert.AreEqual(_msmqTransport.IsQueueDeleted, isQueueDelete); }