コード例 #1
0
        public void ConvertSDKToAPI()
        {
            sdkMessageStatus1 = CreateTypicalSDKMessageStatus();
            apiMessageStatus1 = new MessageStatusConverter(sdkMessageStatus1).ToAPIMessageStatus();

            Assert.AreEqual(apiMessageStatus1.ToString(), sdkMessageStatus1.ToString());
        }
コード例 #2
0
        public void ConvertSDKReadToAPIRead()
        {
            sdkMessageStatus1 = Silanis.ESL.SDK.MessageStatus.READ;
            apiMessageStatus1 = new MessageStatusConverter(sdkMessageStatus1).ToAPIMessageStatus();

            Assert.AreEqual("READ", apiMessageStatus1);
        }
コード例 #3
0
        public void ConvertAPIToSDK()
        {
            apiMessageStatus1 = CreateTypicalAPIMessageStatus();
            sdkMessageStatus1 = new MessageStatusConverter(apiMessageStatus1).ToSDKMessageStatus();

            Assert.AreEqual(sdkMessageStatus1.ToString(), apiMessageStatus1.ToString());
        }
コード例 #4
0
        public void ConvertSDKTrashedToAPITrashed()
        {
            sdkMessageStatus1 = Silanis.ESL.SDK.MessageStatus.TRASHED;
            apiMessageStatus1 = new MessageStatusConverter(sdkMessageStatus1).ToAPIMessageStatus();

            Assert.AreEqual("TRASHED", apiMessageStatus1);
        }
コード例 #5
0
        public void ConvertAPIUnknonwnValueToUnrecognizedMessageStatus()
        {
            apiMessageStatus1 = "NEWLY_ADDED_MESSAGE_STATUS";
            sdkMessageStatus1 = new MessageStatusConverter(apiMessageStatus1).ToSDKMessageStatus();

            Assert.AreEqual(apiMessageStatus1, sdkMessageStatus1.getApiValue());
        }
コード例 #6
0
        public void ConvertSDKNewToAPINew()
        {
            sdkMessageStatus1 = Silanis.ESL.SDK.MessageStatus.NEW;
            apiMessageStatus1 = new MessageStatusConverter(sdkMessageStatus1).ToAPIMessageStatus();

            Assert.AreEqual("NEW", apiMessageStatus1);
        }
コード例 #7
0
        public void ConvertSDKToAPI()
        {
            sdkMessageStatus1 = CreateTypicalSDKMessageStatus();
            apiMessageStatus1 = new MessageStatusConverter(sdkMessageStatus1).ToAPIMessageStatus();

            Assert.AreEqual(apiMessageStatus1.ToString(), sdkMessageStatus1.ToString());
        }
コード例 #8
0
        public void ConvertAPIToSDK()
        {
            apiMessageStatus1 = CreateTypicalAPIMessageStatus();
            sdkMessageStatus1 = new MessageStatusConverter(apiMessageStatus1).ToSDKMessageStatus();

            Assert.AreEqual(sdkMessageStatus1.ToString(), apiMessageStatus1.ToString());
        }
コード例 #9
0
        public void ConvertAPICHALLENGEToCHALLENGEMessageStatus()
        {
            string expectedAPIValue = "TRASHED";

            sdkMessageStatus1 = new MessageStatusConverter(expectedAPIValue).ToSDKMessageStatus();

            Assert.AreEqual(expectedAPIValue, sdkMessageStatus1.getApiValue());
        }
コード例 #10
0
        public void ConvertAPIReadToSDKRead()
        {
            string expectedAPIValue = "READ";

            sdkMessageStatus1 = new MessageStatusConverter(expectedAPIValue).ToSDKMessageStatus();

            Assert.AreEqual(expectedAPIValue, sdkMessageStatus1.getApiValue());
        }
コード例 #11
0
        public void ConvertAPINewToSDKNew()
        {
            string expectedAPIValue = "NEW";

            sdkMessageStatus1 = new MessageStatusConverter(expectedAPIValue).ToSDKMessageStatus();

            Assert.AreEqual(expectedAPIValue, sdkMessageStatus1.getApiValue());
        }
コード例 #12
0
 public Message(MessageStatus status, string content, Signer from)
 {
     Status  = status;
     Content = content;
     From    = from;
 }