/// <summary> /// Sync with services. /// Sync can be started, if there is no other operations /// (property IsAnyOperation == false) /// </summary> public async void StartSync(int start) { try { if (OnSyncServiceNumber == -1) { OnSyncServiceNumber = start; //set connector BaseConnector connector = null; switch (Services[OnSyncServiceNumber].ServerName) { case "google": connector = new GoogleCalendarConnector(Services[OnSyncServiceNumber].DateStart, Services[OnSyncServiceNumber].Period); break; case "facebook": /*connector = new FacebookConnector(Services[OnSyncServiceNumber].Period);*/ break; case "outlook": break; case "vk": break; default: break; } //do sync await connector.GetHolidayList(); } } catch { } }
public void CanGetData() { //arrange GoogleCalendarConnector conn = new GoogleCalendarConnector(); //act var collection = conn.GetHolidayList(); //assert Assert.IsNotNull(collection); }