public void GetRecordingState_Return200Ok(string sampleRecordingId) { ServerCall serverCall = CreateMockServerCall(200, responseContent: DummyRecordingStateResponse); CallRecordingProperties result = serverCall.GetRecordingState(sampleRecordingId); Assert.AreEqual(CallRecordingState.Active, result.RecordingState); }
public void GetRecordingState_Returns404NotFound(string sampleRecordingId) { ServerCall serverCall = CreateMockServerCall(404); RequestFailedException?ex = Assert.Throws <RequestFailedException>(() => serverCall.GetRecordingState(sampleRecordingId)); Assert.NotNull(ex); Assert.AreEqual(ex?.Status, 404); }