public void CreateCompanySuccessfully()
 {
     var repo = new CompanyRepository();
     var createdCompany = repo.CreateCompany(new Company
     {
         LegalName = "Test company #1",
         Name = "Test company #1",
         Country = "AUS"
     });
     Assert.IsNotNull(createdCompany);
     Assert.IsNotNull(createdCompany.Id);
 }
Esempio n. 2
0
        public void CreateCompanySuccessfully()
        {
            var content = File.ReadAllText("../../Fixtures/companies_create.json");

            var client = GetMockClient(content);
            var repo = new CompanyRepository(client.Object);
            var createdCompany = repo.CreateCompany(new Company
            {
                LegalName = "Test company #1",
                Name = "Test company #1",
                Country = "AUS"
            });
            client.VerifyAll();
            Assert.IsNotNull(createdCompany);
            Assert.IsNotNull(createdCompany.Id);
        }