public IndicoConnector(ISubmissionsClient submissionsClient, ISubmissionResultAwaiter submissionResultAwaiter, IReviewsClient reviewsClient, IJobAwaiter jobAwaiter)
 {
     _submissionsClient       = submissionsClient;
     _submissionResultAwaiter = submissionResultAwaiter;
     _reviewsClient           = reviewsClient;
     _jobAwaiter = jobAwaiter;
 }
Пример #2
0
        public void SetUp()
        {
            var container = new IndicoTestContainerBuilder()
                            .ForAutoReviewWorkflow()
                            .Build();

            _dataHelper              = container.Resolve <DataHelper>();
            _reviewsClient           = container.Resolve <IReviewsClient>();
            _submissionResultAwaiter = container.Resolve <ISubmissionResultAwaiter>();
            _jobAwaiter              = container.Resolve <JobAwaiter>();
        }
        public void Init(string token, string uri)
        {
            if (string.IsNullOrEmpty(token) || string.IsNullOrEmpty(uri))
            {
                throw new ArgumentException("Provide token and host parameters.");
            }

            if (!uri.StartsWith("http"))
            {
                throw new ArgumentException("Please provide valid host url that starts with http or https");
            }

            var client = new IndicoV2.IndicoClient(token, new Uri(uri));

            _submissionsClient       = client.Submissions();
            _submissionResultAwaiter = client.GetSubmissionResultAwaiter();
            _reviewsClient           = client.Reviews();
            _jobAwaiter = client.JobAwaiter();
        }
 public ReviewsClientTests()
 {
     ReviewsClient = Helper.GetAuthClient().Reviews;
     UserId        = Helper.GetUserId();
     ReviewsUserId = 7284465;
 }
Пример #5
0
 public ReviewsClientTests()
 {
     ReviewsClient = Helper.GetAuthClient().Reviews;
     UserId = Helper.GetUserId();
     ReviewsUserId = 7284465;
 }