public void SendTestMessage_ValidMessage_NoExceptionThrown() { var testMessage = new TestMessageViewModel(); mockMapper.Setup(x => x.Map <MessageDTO>(It.Is <TestMessageViewModel>(y => y == testMessage))) .Returns(new MessageDTO()); Assert.That(() => { manager.SendTestMessage(testMessage); }, Throws.Nothing); }
public IActionResult Create(TestMessageViewModel testMessage) { testMessageManager.SendTestMessage(testMessage); return(RedirectToAction("Index", "Home")); }