Esempio n. 1
0
        public async void WhenLoginWithValidCredentials_Cookie_ShouldGetSuccessAndCookie()
        {
            var response = await syno.Login(TestConfig.Account, TestConfig.Password, session);

            CheckResponse.HasSucceeded(response);
            Assert.Null(response.Sid);
        }
Esempio n. 2
0
        public async void TaskCreate_WithFile_ShouldReturnsTrue()
        {
            var auth = await station.Login(TestConfig.Account, TestConfig.Password, DownloadStation.SessionName, "sid");

            CheckResponse.HasSucceeded(auth);
            var sid = auth.Sid;

            Assert.NotNull(sid);

            var added = await station.CreateTaskFile(sid.Value, "Resources/test.torrent", "telechargements");

            CheckResponse.HasSucceeded(added);
        }
Esempio n. 3
0
        public async void TaskList_ShouldReturnsCurrentTask()
        {
            var auth = await station.Login(TestConfig.Account, TestConfig.Password, DownloadStation.SessionName, "sid");

            CheckResponse.HasSucceeded(auth);
            var sid = auth.Sid;

            Assert.NotNull(sid);

            var tasks = await station.ListTasks(sid.Value);

            CheckResponse.HasSucceeded(tasks);
            Assert.NotNull(tasks.Data);
            Assert.NotEmpty(tasks.Data.Tasks);
        }
Esempio n. 4
0
        public async void TaskCreate_WithUrl_ShouldReturnsTrue()
        {
            var auth = await station.Login(TestConfig.Account, TestConfig.Password, DownloadStation.SessionName, "sid");

            CheckResponse.HasSucceeded(auth);
            var sid = auth.Sid;

            Assert.NotNull(sid);

            var added =
                await
                station.CreateTaskUri(sid.Value, "http://www.omgtorrent.com/clic_dl.php?id=23642", "telechargements");

            CheckResponse.HasSucceeded(added);
        }