public async Task UpdateTag() { Random rnd = new Random(); var newValue = rnd.Next(1, 1000).ToString(); var newTag = new CompanyCam.Models.Tag() { DisplayValue = newValue }; var tag = await new TagService().Update(_tag.Id, newTag); Assert.AreEqual(tag.DisplayValue, newValue); }
//Create Tag public static async Task <CompanyCam.Models.Tag> CreateTag() { CompanyCam.CompanyCamConfiguration.SetApiKey(TestConfiguration.Apikey); CompanyCam.CompanyCamConfiguration.SetApiKey(TestConfiguration.SecretKey); CompanyCam.CompanyCamConfiguration.SetUserEmail(TestConfiguration.UserEmail); Random rnd = new Random(); var newTag = new CompanyCam.Models.Tag() { DisplayValue = rnd.Next(1, 1000).ToString() }; return(await new TagService().Create(newTag)); }
public static async Task ClassInit(TestContext context) { _tag = await Helpers.CreateTag(); }