コード例 #1
0
        public void convertAPIToAPI()
        {
            apiVirtualRoom1 = new OneSpanSign.API.VirtualRoom();
            apiVirtualRoom2 = new VirtualRoomConverter(apiVirtualRoom1).ToAPIVirtualRoom();

            Assert.IsNotNull(apiVirtualRoom2);
            Assert.AreEqual(apiVirtualRoom2, apiVirtualRoom1);
        }
コード例 #2
0
 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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
 public VirtualRoomConverter(OneSpanSign.API.VirtualRoom apiVirtualRoom)
 {
     this.apiVirtualRoom = apiVirtualRoom;
 }
コード例 #7
0
 public void convertNullAPIToAPI()
 {
     apiVirtualRoom1 = null;
     converter       = new VirtualRoomConverter(apiVirtualRoom1);
     Assert.IsNull(converter.ToAPIVirtualRoom());
 }