public void Test_01_SimpleCase()
        {
            string userId = "TEST_SERVICE";

            Task task1 = new Task(m_userId);
            task1.UserId = userId;
            task1.Text = "Test";
            task1.SourceId = "SourceIdTest";
            task1.DateRemainder = DateTime.Now.AddDays(1);

            List<Task> tasks = new List<Task>();
            tasks.Add(task1);
            Minder.Objects.SyncObject syncObject = new Minder.Objects.SyncObject();
            syncObject.LastSyncDate = DateTime.Now.AddHours(-1);
            syncObject.UserId = userId;
            syncObject.Tasks = tasks;

            List<Task> result = new SyncController().GetSyncedTasksFromServer(syncObject);
            Assert.AreEqual(1, result.Count);

            // We load directly, bypassing sync function and double check it
            result = GetAllTaskFromServer();
            Assert.AreEqual(1, result.Count);
        }
Esempio n. 2
0
 public MainFormPreparer()
 {
     m_form = new MainFormLaunchy();
     m_mainForm = new MainFormCollector().GetForm();
     m_syncController = new SyncController();
 }