Example #1
0
        /// <summary>
        /// Gets the virtual room.
        ///
        /// </summary>
        /// <returns>Virtual Room.</returns>
        public VirtualRoom GetVirtualRoom(PackageId packageId)
        {
            String path = template.UrlFor(UrlTemplate.VIRTUAL_ROOM_CONFIG_PATH)
                          .Replace("{packageId}", packageId.Id)
                          .Build();

            String stringResponse;

            try
            {
                stringResponse = restClient.Get(path);
            }
            catch (OssServerException e)
            {
                throw new OssServerException("Could not get VirtualRoom." + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e)
            {
                throw new OssException("Could not get VirtualRoom." + " Exception: " + e.Message, e);
            }

            OneSpanSign.API.VirtualRoom VirtualRoom = JsonConvert.DeserializeObject <OneSpanSign.API.VirtualRoom>(stringResponse);
            VirtualRoomConverter        converter   = new VirtualRoomConverter(VirtualRoom);

            return(converter.ToSDKVirtualRoom());
        }
 public void convertNullSDKToSDK()
 {
     sdkVirtualRoom1 = null;
     converter       = new VirtualRoomConverter(sdkVirtualRoom1);
     Assert.IsNull(converter.ToSDKVirtualRoom());
 }
 public void convertNullAPIToSDK()
 {
     apiVirtualRoom1 = null;
     converter       = new VirtualRoomConverter(apiVirtualRoom1);
     Assert.IsNull(converter.ToSDKVirtualRoom());
 }