public void StartExchange_IsThereCanBeOnlySourceTasks()
        {
            PlannerText pln = this.GetPlannerText();

            PlannerTask tmpTask1 = new PlannerTask(false);

            tmpTask1.id = 1;
            tmpTask1.uploadDownload.Add(new FileSupertypeFake(1, 3, WorkResult.Success, false, ActionType.Source));
            tmpTask1.uploadDownload.Add(new FileSupertypeFake(2, 4, WorkResult.Success, false, ActionType.Source));
            pln.tasks.Add(tmpTask1);

            PlannerTask tmpTask2 = new PlannerTask(false);

            tmpTask2.id = 2;
            tmpTask2.uploadDownload.Add(new FileSupertypeFake(1, 3, WorkResult.Error, false, ActionType.Source));
            tmpTask2.uploadDownload.Add(new FileSupertypeFake(2, 4, WorkResult.Error, false, ActionType.Destination));
            pln.tasks.Add(tmpTask2);

            ResultController rc = pln.StartExchange();

            Assert.AreEqual(rc.globalWorkRes, WorkResult.Error);
            Assert.AreEqual(rc.GetAllFiles(ActionType.Source), 2);
            Assert.AreEqual(rc.GetAllFiles(ActionType.Destination), 4);
            Assert.AreEqual(rc.GetAllBytes(ActionType.Source), 6);
            Assert.AreEqual(rc.GetAllBytes(ActionType.Destination), 8);
        }
        public void StartExchange_SuccessSession_Success()
        {
            PlannerText pln = this.GetPlannerText();

            PlannerTask tmpTask1 = new PlannerTask(false);

            tmpTask1.uploadDownload.Add(new FileSupertypeFake(1, 2, WorkResult.Success, false, ActionType.Source));
            tmpTask1.uploadDownload.Add(new FileSupertypeFake(1, 2, WorkResult.Success, false, ActionType.Destination));
            pln.tasks.Add(tmpTask1);

            ResultController rc = pln.StartExchange();

            Assert.AreEqual(rc.globalWorkRes, WorkResult.Success);
            Assert.AreEqual(rc.GetAllFiles(ActionType.Source), 1);
            Assert.AreEqual(rc.GetAllFiles(ActionType.Destination), 1);
            Assert.AreEqual(rc.GetAllBytes(ActionType.Source), 2);
            Assert.AreEqual(rc.GetAllBytes(ActionType.Destination), 2);
        }