public void Post_WhenCalled_ReturnsOk() { var okResult = _controller.Post(new EventLog() { EventID = 0, Level = "ERROR", Title = "development.StaticOperation.Service: <failed>", CollectedBy = "yvqnygr3i1xl47wanrg2", Log = "IOException", Description = "It is thrown when an input-output operation failed or interrupted", Origin = "app.server.com.br", Environment = "Development", CreatedDate = new DateTime(2008, 5, 1, 8, 30, 52) } ); //This test is unable to check for id different than zero since only the user has access to those elements. Assert.IsType <OkObjectResult>(okResult); }