public void RenderMessage_Good_ReturnCorrectJson() { var msg = new ScoreMessageJson(); msg.Initialize(0.98m, 0.75m, true); Assert.That(msg.RenderMessage(), Does.EndWith("\"success\":true,\"score\":0.98,\"threshold\":0.75}")); Assert.That(msg.RenderMessage(), Does.StartWith("{\"timestamp\":\"20")); }
public void RenderMessage_Insufficient_ReturnCorrectJson() { var msg = new ScoreMessageJson(); msg.Initialize(0.62m, 0.75m, false); Assert.That(msg.RenderMessage(), Does.EndWith("\"success\":false,\"score\":0.62,\"threshold\":0.75}")); Assert.That(msg.RenderMessage(), Does.StartWith("{\"timestamp\":\"20")); }