public void convertAPIToAPI() { apiVirtualRoom1 = new OneSpanSign.API.VirtualRoom(); apiVirtualRoom2 = new VirtualRoomConverter(apiVirtualRoom1).ToAPIVirtualRoom(); Assert.IsNotNull(apiVirtualRoom2); Assert.AreEqual(apiVirtualRoom2, apiVirtualRoom1); }
private OneSpanSign.API.VirtualRoom buildApiVirtualRoom() { OneSpanSign.API.VirtualRoom result = new OneSpanSign.API.VirtualRoom(); result.Video = true; result.VideoRecording = true; result.StartDatetime = DateTime.Now; result.HostUid = "hostUid"; return(result); }
public void convertSDKToAPI() { sdkVirtualRoom1 = buildSdkVirtualRoom(); apiVirtualRoom1 = new VirtualRoomConverter(sdkVirtualRoom1).ToAPIVirtualRoom(); Assert.IsNotNull(apiVirtualRoom1); Assert.AreEqual(apiVirtualRoom1.Video, sdkVirtualRoom1.Video); Assert.AreEqual(apiVirtualRoom1.VideoRecording, sdkVirtualRoom1.VideoRecording); Assert.AreEqual(apiVirtualRoom1.StartDatetime, sdkVirtualRoom1.StartDatetime); Assert.AreEqual(apiVirtualRoom1.HostUid, sdkVirtualRoom1.HostUid); }
public void convertAPIToSDK() { apiVirtualRoom1 = buildApiVirtualRoom(); sdkVirtualRoom1 = new VirtualRoomConverter(apiVirtualRoom1).ToSDKVirtualRoom(); Assert.IsNotNull(sdkVirtualRoom1); Assert.AreEqual(sdkVirtualRoom1.Video, apiVirtualRoom1.Video); Assert.AreEqual(sdkVirtualRoom1.VideoRecording, apiVirtualRoom1.VideoRecording); Assert.AreEqual(sdkVirtualRoom1.StartDatetime, apiVirtualRoom1.StartDatetime); Assert.AreEqual(sdkVirtualRoom1.HostUid, apiVirtualRoom1.HostUid); }
internal OneSpanSign.API.VirtualRoom ToAPIVirtualRoom() { if (sdkVirtualRoom == null) { return(apiVirtualRoom); } apiVirtualRoom = new OneSpanSign.API.VirtualRoom(); apiVirtualRoom.Video = sdkVirtualRoom.Video; apiVirtualRoom.VideoRecording = sdkVirtualRoom.VideoRecording; apiVirtualRoom.HostUid = sdkVirtualRoom.HostUid; apiVirtualRoom.StartDatetime = sdkVirtualRoom.StartDatetime; return(apiVirtualRoom); }
public VirtualRoomConverter(OneSpanSign.API.VirtualRoom apiVirtualRoom) { this.apiVirtualRoom = apiVirtualRoom; }
public void convertNullAPIToAPI() { apiVirtualRoom1 = null; converter = new VirtualRoomConverter(apiVirtualRoom1); Assert.IsNull(converter.ToAPIVirtualRoom()); }