Esempio n. 1
0
 public async void ShouldBeAbleToGetAbn()
 {
     var client = new AbrApi.Client(ApiKey);
     var pssAbn = "74172177893";
     var result = await client.AbnSearch(pssAbn);
     result.EntityName.ShouldBe("THE TRUSTEE FOR PSS FUND");
 }
Esempio n. 2
0
 public async void ShouldBeAbleToGetSearchResults()
 {
     var client = new AbrApi.Client(ApiKey);
     var bunnings = "BUNNINGS GROUP LIMITED";
     var result = await client.NameSearch(bunnings);
     result.Names.Count.ShouldBePositive();
     result.Names.First(x => x.Score == 100).Abn.ShouldBe("26008672179");
 }
Esempio n. 3
0
 public async void ShouldBeAbleToGetAcn()
 {
     var client = new AbrApi.Client(ApiKey);
     var bunningsAcn = "008672179";
     var result = await client.AcnSearch(bunningsAcn);
     result.Abn.ShouldBe("008672179");
     result.EntityName.ShouldBe("BUNNINGS GROUP LIMITED");
 }
Esempio n. 4
0
        public async void ShouldThrowAnInvalidApiKeyException()
        {
            var client = new AbrApi.Client(Guid.Empty);
            var bunnings = "BUNNINGS GROUP LIMITED";

            Should.Throw<InvalidApiKeyException>(() =>
            {
                var y = client.NameSearch(bunnings).GetAwaiter().GetResult();
            });

        }