예제 #1
0
        public void ThrowOnInvalidRequest2()
        {
            var client = ApiClientHelper.GetRealApiClient();

            var builder = new ApiRequestBuilder();
            var request = builder.GetProjectsRequest();
            request.Request.Parameters[1].Name = "invalid-fake-param";

            var res = client.GetObjects<ApiProject>(request);
        }
예제 #2
0
        public static IEnumerable <ApiProject> GetProjects(bool onlyEnabled = true)
        {
            var client  = ApiClientHelper.GetRealApiClient();
            var request = _builder.GetProjectsRequest();

            var projects = client.GetObjects <ApiProject>(request);

            return((onlyEnabled)
                ? projects.Where(p => p.On >= 0).ToList()
                : projects.ToList());
        }
예제 #3
0
        public void ThrowOnInvalidRequest2()
        {
            var client = ApiClientHelper.GetRealApiClient();

            var builder = new ApiRequestBuilder();
            var request = builder.GetProjectsRequest();

            request.Request.Parameters[1].Name = "invalid-fake-param";

            var res = client.GetObjects <ApiProject>(request);
        }