public void ShouldReturnValidObject_WhenValidInput( string eps, string months, string date, decimal expectedEPS, int expectedMonths) { var result = new FinancialReportBuilder() .SetEPS(eps) .SetMonthsInReport(months) .SetNextReportDate(date) .Build(); result.EPS.Should().Be(expectedEPS); result.MonthsInReport.Should().Be(expectedMonths); result.NextReportDate.Should().Be(new DateTime(2999, 12, 31)); }
public void ShouldReturnValidObject_WhenValidInput( string isin, string name, string ownInvestorLink, string stockExchangeLink, string position) { var datetime = DateTime.Now.Date; var financialAnalysis = new FinancialAnalysisBuilder() .SetClosingPrice(1) .SetEPS(2.7m) .SetMonthsInReport(6) .Build(); var financialReport = new FinancialReportBuilder() .SetEPS(3.8m) .SetMonthsInReport(3) .SetNextReportDate(datetime) .Build(); var result = new RegistryEntryBuilder() .SetIsin(isin) .SetName(name) .SetOwnInvestorLink(ownInvestorLink) .SetStockExchangeLink(stockExchangeLink) .SetPosition(position) .SetFinancialAnalysis(financialAnalysis) .SetFinancialReport(financialReport) .Build(); result.Should().NotBeNull(); result.Isin.Should().Be(isin); result.Name.Should().Be(name); result.OwnInvestorLink.Should().Be(ownInvestorLink); result.StockExchangeLink.Should().Be(stockExchangeLink); result.Position.Should().Be(Position.NoPosition); result.FinancialAnalysis.Should().Be(financialAnalysis); result.FinancialReport.Should().Be(financialReport); }