public async Task Oauth2AccessTokenTest() { var res = await JdVopApi.Oauth2AccessTokenAsync(TestHelper.VopClient); Assert.True(res.Success, res.ResultMessage); var token = res.Result; Assert.NotNull(token); Assert.NotEmpty(token.AccessToken); TestHelper.AccessToken = token; }
public async Task GetProvinceTest() { await Assert.ThrowsAsync <ArgumentException>(() => JdVopApi.GetProvinceAsync(null)); var res = await JdVopApi.Oauth2AccessTokenAsync(TestHelper.VopClient); var api = new JdVopApi(res.Result); var rsp = await api.GetProvinceAsync(); //var res = await ApiInstance.GetProvinceAsync(); //Assert.True(res.Success, res.ResultMessage); //var province = res.Result; //Assert.NotNull(province); //Assert.NotEmpty(province); //Assert.Contains(TestHelper.JDArress.Province, province.Keys); }