public void AddPostToTopic_GivenWrongId_ReturnStatusCode406() { var topicId = -1; var post = new Post { OwnerId = _user.Id, Message = "Something" }; var expected = new StatusCodeResult(406); var actual = (StatusCodeResult)_topicController.AddPostToTopic(topicId, post).Result; Assert.AreEqual(expected.StatusCode, actual.StatusCode); }