Пример #1
0
        public static async Task ClassInit(TestContext context)
        {
            _project = await Helpers.CreateProject();

            _photo = await Helpers.CreatePhoto(_project.Id);

            _user = await Helpers.CreateUser();
        }
Пример #2
0
        //Create Photo
        public static async Task <CompanyCam.Models.Photo> CreatePhoto(string projectId)
        {
            CompanyCam.CompanyCamConfiguration.SetApiKey(TestConfiguration.Apikey);
            CompanyCam.CompanyCamConfiguration.SetApiKey(TestConfiguration.SecretKey);
            CompanyCam.CompanyCamConfiguration.SetUserEmail(TestConfiguration.UserEmail);

            var newPhoto = new CompanyCam.Models.Photo()
            {
                Coordinates = new Coordinates()
                {
                    Lat = 40.8191702,
                    Lon = -96.7119411
                },
                CapturedAt = 1152230396,
                Uri        = "http://www.agilx.com/wp-content/uploads/2013/04/companycam.png"
            };

            return(await new PhotoService().Create(projectId, newPhoto));
        }