public static void AssertStatusIs(this ITestResponse response, int expectedStatus) { if (response.Status != expectedStatus) { throw new FrankAssertionException($"Expected {expectedStatus}, found {response.Status}"); } }
public static void AssertJsonBodyMatches(this ITestResponse response, object expected) { var expectedString = JsonConvert.SerializeObject(expected); if (response.Body != expectedString) { throw new FrankAssertionException($"Expected {expectedString}, found {response.Body}"); } }
public static void AssertIsOk(this ITestResponse response) => response.AssertStatusIs(200);
public static void AssertIsNotFound(this ITestResponse response) => response.AssertStatusIs(404);