public void convertAPIToAPI()
        {
            apiSenderImageSignature1 = new OneSpanSign.API.SenderImageSignature();
            apiSenderImageSignature2 = new SenderImageSignatureConverter(apiSenderImageSignature1).ToAPISenderImageSignature();

            Assert.IsNotNull(apiSenderImageSignature2);
            Assert.AreEqual(apiSenderImageSignature2, apiSenderImageSignature1);
        }
 private OneSpanSign.API.SenderImageSignature buildApiSenderImageSignature()
 {
     OneSpanSign.API.SenderImageSignature result = new OneSpanSign.API.SenderImageSignature();
     result.Content   = "content";
     result.FileName  = "fileName";
     result.MediaType = "mediaType";
     return(result);
 }
        public void convertSDKToAPI()
        {
            sdkSenderImageSignature1 = buildSdkSenderImageSignature();
            apiSenderImageSignature1 = new SenderImageSignatureConverter(sdkSenderImageSignature1).ToAPISenderImageSignature();

            Assert.IsNotNull(apiSenderImageSignature1);
            Assert.AreEqual(apiSenderImageSignature1.Content, sdkSenderImageSignature1.Content);
            Assert.AreEqual(apiSenderImageSignature1.FileName, sdkSenderImageSignature1.FileName);
            Assert.AreEqual(apiSenderImageSignature1.MediaType, sdkSenderImageSignature1.MediaType);
        }
        public void convertAPIToSDK()
        {
            apiSenderImageSignature1 = buildApiSenderImageSignature();
            sdkSenderImageSignature1 = new SenderImageSignatureConverter(apiSenderImageSignature1).ToSDKSenderImageSignature();

            Assert.IsNotNull(sdkSenderImageSignature1);
            Assert.AreEqual(sdkSenderImageSignature1.Content, apiSenderImageSignature1.Content);
            Assert.AreEqual(sdkSenderImageSignature1.FileName, apiSenderImageSignature1.FileName);
            Assert.AreEqual(sdkSenderImageSignature1.MediaType, apiSenderImageSignature1.MediaType);
        }
Ejemplo n.º 5
0
        internal OneSpanSign.API.SenderImageSignature ToAPISenderImageSignature()
        {
            if (sdkSenderImageSignature == null)
            {
                return(apiSenderImageSignature);
            }
            apiSenderImageSignature           = new OneSpanSign.API.SenderImageSignature();
            apiSenderImageSignature.Content   = sdkSenderImageSignature.Content;
            apiSenderImageSignature.FileName  = sdkSenderImageSignature.FileName;
            apiSenderImageSignature.MediaType = sdkSenderImageSignature.MediaType;

            return(apiSenderImageSignature);
        }
 public void convertNullAPIToAPI()
 {
     apiSenderImageSignature1 = null;
     converter = new SenderImageSignatureConverter(apiSenderImageSignature1);
     Assert.IsNull(converter.ToAPISenderImageSignature());
 }
Ejemplo n.º 7
0
 public SenderImageSignatureConverter(OneSpanSign.API.SenderImageSignature apiSenderImageSignature)
 {
     this.apiSenderImageSignature = apiSenderImageSignature;
 }