Esempio n. 1
0
 public void ExecuteDeleteCmdApplicationConfigurationCommandWithNullThrowsException(
     CmdApplicationConfigurationService sut,
     TestDomainEventHandler <ConfigurationDeletedEvent> deleteHandler,
     DeleteCmdApplicationConfigurationCommand command)
 {
     DomainEvents.Subscribe(deleteHandler);
     sut.Execute(command);
     Assert.True(deleteHandler.EventHandlerInvoked);
 }
Esempio n. 2
0
 public void ExecuteSaveCmdApplicationConfigurationWithExistingNameRaisesRejectedEvent(
     [Frozen] Mock <ICmdApplicationConfigurationRepository> repository,
     SaveCmdApplicationConfigurationCommand command,
     TestDomainEventHandler <CmdApplicationConfigurationSaveRejected> testHandler,
     CmdApplicationConfigurationService sut)
 {
     repository
     .Setup(a => a.CheckIfConfigurationWithSameNameExists(command.ApplicationConfiguration))
     .Returns(true);
     DomainEvents.Subscribe(testHandler);
     sut.Execute(command);
     Assert.True(testHandler.EventHandlerInvoked);
 }