public async Task Test_AddLead() { // Arrange //var apiFactory = new LeadApiFactory(); await _apiFactory.SeedDatabase(async context => { await context.SaveChangesAsync(); }); var client = _apiFactory.CreateLeadClient(); var lead = new LeadApi.Client.Lead { Name = "Phill", ZipCode = "60640" }; // Act var result = await client.AddLeadAsync(lead); // Assert Assert.IsTrue(result.LeadID > 0); Assert.AreEqual(result.Name, lead.Name); Assert.AreEqual(result.ZipCode, lead.ZipCode); }
public void Init() { _apiFactory = new LeadApiFactory(); _leadClient = _apiFactory.CreateLeadClient(); _leadServicebusHostFactory = new LeadServicebusHostFactory(_leadClient); }