コード例 #1
0
        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);
        }
コード例 #2
0
 public IActionResult Create(TestMessageViewModel testMessage)
 {
     testMessageManager.SendTestMessage(testMessage);
     return(RedirectToAction("Index", "Home"));
 }