コード例 #1
0
        public void ApiMiddlewareRightTest()
        {
            var amw = new ApiMiddleware();

            Assert.IsNotNull(amw);

            var result2 = amw.Get(string.Concat("https://trello.com/b/", "wiOPDS9X", ".json")).Result;

            Assert.IsInstanceOfType(result2, typeof(Trello));
        }
コード例 #2
0
        public void ApiMiddlewareTest()
        {
            var amw = new ApiMiddleware();

            Assert.IsNotNull(amw);

            var result = amw.Get(string.Concat("https://trello.com/b/", "hard_error", ".json")).Result;

            Assert.IsNull(result);
        }
コード例 #3
0
        public async Task <Trello> DownloadAsync()
        {
            var apiMiddleware = new ApiMiddleware();
            var apiResponse   = await apiMiddleware.Get(string.Concat("https://trello.com/b/", _trelloUrl, ".json"));

            Source = "online";
            apiResponse.LastDbUpdate = DateTime.Now;
            AddOrUpdate(apiResponse);

            return(apiResponse);
        }