public void Should_Format_CashFlowStatement() { using (StreamReader reader = new StreamReader(Path.Combine("IEXResponseText/CashFlowStatement.txt"))) { string cashFlowStatementJson = reader.ReadToEnd(); IEXFormatter formatter = new IEXFormatter(); IEXCashFlowStatementList incomeStatementList = formatter.FormatCashFlowStatement(cashFlowStatementJson); incomeStatementList.Symbol.Should().Be("AAPL"); incomeStatementList.CashFlow.Count.Should().Be(4); incomeStatementList.CashFlow[0].CashFlow.Should().Be(26779302494); incomeStatementList.CashFlow[0].Depreciation.Should().Be(3514688687); } }
public IEXCashFlowStatementList FormatCashFlowStatement(string cashFlowStatementJson) { IEXCashFlowStatementList cashFlowStatementList = JsonConvert.DeserializeObject <IEXCashFlowStatementList>(cashFlowStatementJson); return(cashFlowStatementList); }