public void Add() { Revendedor rev = new Revendedor() { Nome = "Usuario de Teste", Sobrenome = "Jacometti", CPF = "00011122233", Email = "*****@*****.**", Senha = "123456", DataCadastro = DateTime.Now, AprovAuto = false }; // Act var result = controller.Post(rev); var okResult = result as OkObjectResult; valor = JsonConvert.DeserializeObject <ModelTeste>(okResult.Value.ToString().Replace("=", ":")); // Assert Assert.IsNotNull(okResult); Assert.AreEqual(200, okResult.StatusCode); }