public void convertSDKToSDK() { sdkEventNotificationConfig1 = CreateTypicalSDKEventNotificationConfig(); sdkEventNotificationConfig2 = new EventNotificationConfigConverter(sdkEventNotificationConfig1).ToSDKEventNotificationConfig(); Assert.IsNotNull(sdkEventNotificationConfig2); Assert.AreEqual(sdkEventNotificationConfig2, sdkEventNotificationConfig1); }
public EventNotificationConfig build() { EventNotificationConfig result = new EventNotificationConfig(url); result.Key = key; foreach (NotificationEvent notificationEvent in events) { result.NotificationEvents.Add(notificationEvent); } return(result); }
public void convertSDKToAPI() { sdkEventNotificationConfig1 = CreateTypicalSDKEventNotificationConfig(); apiCallback1 = new EventNotificationConfigConverter(sdkEventNotificationConfig1).ToAPICallback(); Assert.IsNotNull(apiCallback1); Assert.AreEqual(apiCallback1.Url, sdkEventNotificationConfig1.Url); Assert.AreEqual(apiCallback1.Events.Count, 3); Assert.AreEqual(apiCallback1.Events[0], sdkEventNotificationConfig1.NotificationEvents[0].getApiValue()); Assert.AreEqual(apiCallback1.Events[1], sdkEventNotificationConfig1.NotificationEvents[1].getApiValue()); Assert.AreEqual(apiCallback1.Events[2], sdkEventNotificationConfig1.NotificationEvents[2].getApiValue()); }
public void convertAPIToSDK() { apiCallback1 = CreateTypicalAPICallback(); sdkEventNotificationConfig1 = new EventNotificationConfigConverter(apiCallback1).ToSDKEventNotificationConfig(); Assert.IsNotNull(sdkEventNotificationConfig1); Assert.AreEqual(sdkEventNotificationConfig1.Url, apiCallback1.Url); Assert.AreEqual(sdkEventNotificationConfig1.NotificationEvents.Count, 3); Assert.AreEqual(sdkEventNotificationConfig1.NotificationEvents[0].getApiValue(), apiCallback1.Events[0]); Assert.AreEqual(sdkEventNotificationConfig1.NotificationEvents[1].getApiValue(), apiCallback1.Events[1]); Assert.AreEqual(sdkEventNotificationConfig1.NotificationEvents[2].getApiValue(), apiCallback1.Events[2]); }
public OneSpanSign.Sdk.EventNotificationConfig ToSDKEventNotificationConfig() { if (apiCallback == null) { return(sdkEventNotificationConfig); } EventNotificationConfig eventNotificationConfig = new EventNotificationConfig(apiCallback.Url); eventNotificationConfig.Key = apiCallback.Key; foreach (string callbackEvent in apiCallback.Events) { eventNotificationConfig.AddEvent(new EventNotificationConverter(callbackEvent).ToSDKNotificationEvent()); } return(eventNotificationConfig); }
public void convertNullSDKToSDK() { sdkEventNotificationConfig1 = null; converter = new EventNotificationConfigConverter(sdkEventNotificationConfig1); Assert.IsNull(converter.ToSDKEventNotificationConfig()); }