Exemple #1
0
        public void VesyncApi_ValidConfig_CreatesApi()
        {
            var config = new VesyncApiConfiguration();

            var api = new VesyncApi(config);

            api.Should().NotBeNull();
        }
        public async Task LoginAsync_GivenValidCredentials_ReturnsTokenAndAccountId()
        {
            var api     = new VesyncApi(Configuration);
            var account = await api.LoginAsync();

            account.Result.Should().NotBeNull();
            account.Result.Token.Should().NotBeNullOrWhiteSpace();
            account.Result.AccountId.Should().NotBeNullOrWhiteSpace();
        }
Exemple #3
0
 public async Task Initialize()
 {
     Api     = new VesyncApi(Configuration);
     Account = await Api.LoginAsync();
 }