public void TestResetPositionResponseNotNull() { Sonda sonda = new Sonda(); sonda.ResetPosition(); string returnTest = HttpContext.Current.Response.Output.ToString(); Assert.IsNotNull(returnTest); }
public void TestResetPosition() { Object expectedReturnJSON = new { message = "Posição da sonda reiniciada com sucesso!" }; string expectedReturn = (new JavaScriptSerializer()).Serialize(expectedReturnJSON); Sonda sonda = new Sonda(); sonda.ResetPosition(); string returnTest = HttpContext.Current.Response.Output.ToString(); Assert.AreEqual(expectedReturn, returnTest); }