public void deletechannel() { FakeChatService fakechat = new FakeChatService(); ChatController _chatcontroller = new ChatController(fakechat); var result = _chatcontroller.DeleteChannelById("5b8932523f0c56095c70d82d"); var notePosted = result as NoContentResult; Assert.Equal(204, notePosted.StatusCode); }