/// <summary> /// Dispose /// </summary> public void Dispose() { CommitCompleted(); repositoryWarehouses?.Clear(); DomainEventManager = null; DomainEvents?.Clear(); }
public void SetColors_GivenValidRequestNoBits() { bool called = false; DomainEvents.Clear(); DomainEvents.Register <MenuColorChanging>(x => called = true); SetSettings(true, 0); var(menuCommand, chatUser) = SetUpTest(); var commandData = new CommandData { User = chatUser, Arguments = new List <string> { "red" }, }; menuCommand.Execute(commandData); called.Should().BeTrue(); }
public void SetColor_GivenEnoughBits() { bool called = false; DomainEvents.Clear(); DomainEvents.Register <MenuColorChanging>(x => called = true); SetSettings(true, 1); var(menuCommand, chatUser) = SetUpTest(100); var commandData = new CommandData { User = chatUser, Arguments = new List <string> { "red", "Cheer1" }, Bits = 1, Message = "!menu red Cheer1" }; menuCommand.Execute(commandData); called.Should().BeTrue(); }
public void ClearDomainEvents() { DomainEvents?.Clear(); }
public void Cleanup() { DomainEvents.Clear(); }