public async Task <ActionResult> Upload(string companyName, string vat, string ownerName) { if (companyName != null) { var inputCity = new CompanyInputModel { Name = companyName, VAT = vat, Owner = ownerName }; var companyOutputModel = new CompanyOutputModel { Name = await companiesService.UploadCompany(inputCity), VAT = vat, Owner = ownerName }; return(this.View(companyOutputModel)); } else { return(Redirect("Index")); } }
public CompanyServiceTest() { //Models company = new Company("League of Legends"); companyInput = new CompanyInputModel { Name = "League of Legends" }; companyOutput = new CompanyOutputModel { Id = Guid.NewGuid(), Name = "League of Legends" }; cancellationToken = new CancellationToken(); //Mocks mockMapper = new Mock <IMapper>(); mockCompanyRepository = new Mock <ICompanyRepository>(); }