コード例 #1
0
        public void TestPostCalendarExceptions()
        {
            TasksApi target = new TasksApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);


            string name = "sample-project-2.mpp";
            int? calendarUid = 1;
            string fileName = "tasks.mpp";
            string storage = null;
            string folder = null;
            CalendarException body = new CalendarException();
            body.Name = null;
            body.FromDate = new DateTime(2016, 2, 18);
            body.ToDate = new DateTime(2016, 2, 28);

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\tasks\\resources\\" + name));
            SaaSposeResponse actual;
            actual = target.PostCalendarExceptions(name, calendarUid, fileName, storage, folder, body);
            Assert.AreEqual("201", actual.Code);
            Assert.IsInstanceOfType(new SaaSposeResponse(), actual.GetType());
        }