public void ThenResponseStatusShouldBeOk(int code) { if (code == 200) { httpsRequests.GetResponseStatus().Should().Be(HttpStatusCode.OK); } else if (code == 201) { httpsRequests.GetResponseStatus().Should().Be(HttpStatusCode.Created); } else { throw new Exception("wrong code tested in feature file"); } }