public async Task Should_Create_Company() { //Arrange LoginAsHostAdmin(); CreditsHero.Common.Companies.Dtos.CompanyDto output = new Common.Companies.Dtos.CompanyDto(); CreditsHero.Common.Companies.Dtos.CreateCompanyInput input = new Common.Companies.Dtos.CreateCompanyInput() { CostPerCredit = 1.23M, Name = "TestNewCompany" }; //Act output = await _companyAppService.CreateCompany(input); //Assert output.ShouldNotBeNull(); output.Id.ShouldNotBeNull(); output.Id.ShouldBeOfType(typeof(Guid)); //Cleanup DeleteTestCompany(output.Id.ToString()); }
private async Task<CreditsHero.Common.Companies.Dtos.CompanyDto> CreateTestCompany(decimal costPerCredit, string name) { CreditsHero.Common.Companies.Dtos.CompanyDto output = new Common.Companies.Dtos.CompanyDto(); CreditsHero.Common.Companies.Dtos.CreateCompanyInput input = new Common.Companies.Dtos.CreateCompanyInput() { CostPerCredit = costPerCredit, Name = name }; output = await _companyAppService.CreateCompany(input); return output; }