public void CallingPostAssetsReturnsCreatedResponse() { var sut = new AssetsController(); var assetToPost = new DocumentAsset { Identifier = "54321", DocumentType = "Doc Type" }; var result = sut.Post(assetToPost.SerialiseToJson()); Assert.NotNull(result); Assert.IsInstanceOf <IActionResult>(result); Assert.IsInstanceOf <ObjectResult>(result); var actionResult = result as ObjectResult; Assert.AreEqual(201, actionResult.StatusCode); StringAssert.Contains("\"identifier\":\"54321\"", actionResult.Value.ToString()); }