public void Succeed_With_Valid_Input_Negative() { //Arrange var container = BootstrapApplication.Init(); var query = new PositiveNumberQueryRequest(false); var sut = new Controller(container.Resolve <IMediator>()); //Act var result = sut.Get(query); //Assert Assert.True(result.Number < 0); }
public PositiveNumberQueryResult Get(PositiveNumberQueryRequest request) { PositiveNumberQueryResult result = null; try { result = mediator.Send(request); } catch (Exception ex) { Debug.WriteLine(ex.Message); } return(result); }