Пример #1
0
        private CompanyDetail GetTestCompany()
        {
            var company = new CompanyDetail
            {
                Abn = "53004085616",
                Name = "MakeMoney Inc2." + System.Guid.NewGuid(),
                Website = "https://makemoney.org",
                LongDescription = "A test company",
                TradingName = "MakeMoney Inc",
                CompanyEmail = "*****@*****.**",
            };

            return company;
        }
Пример #2
0
 public ProxyResponse<UpdateCompanyResult> UpdateCompany(CompanyDetail company, int companyId)
 {
     OperationMethod = HttpMethod.Put;
     var uri = base.GetRequestUri(companyId.ToString());
     return base.GetResponse<CompanyDetail, UpdateCompanyResult>(uri, company);
 }
Пример #3
0
 private CompanyDetail GetCompany()
 {
     var companyDetail = new CompanyDetail
     {
         LongDescription = "Some ACME Company".MakeUnique(),
         TradingName = "Trading".MakeUnique(),
         Abn = "123456718",
         CompanyEmail = "*****@*****.**",
         Name = "ACME".MakeUnique(),
         CreatedDateUtc = DateTime.UtcNow,
         Website = "https://acme.com"
     };
     return companyDetail;
 }
Пример #4
0
 public ProxyResponse<InsertCompanyResult> InsertCompany(CompanyDetail company)
 {
     OperationMethod = HttpMethod.Post;
     var uri = base.GetRequestUri(null);
     return base.GetResponse<CompanyDetail, InsertCompanyResult>(uri, company);
 }
Пример #5
0
 private static void AssertCompany(Company aggregateCompany, CompanyDetail company)
 {
     Assert.AreEqual(aggregateCompany.TradingName, company.TradingName,
         "TradingName not updated for company");
     Assert.AreEqual(aggregateCompany.Abn, company.Abn,
         "ABN not updated for contact manager");
     Assert.AreEqual(aggregateCompany.CompanyEmail, company.CompanyEmail,
         "CompanyEmail not updated for company");
     Assert.AreEqual(aggregateCompany.LongDescription, company.LongDescription,
         "LongDescription not updated for company");
     Assert.AreEqual(aggregateCompany.Name, company.Name,
         "Name not updated for company");
 }