public void FindBillDocuments()
        {
            IHtmlDocument billDocumentIndex   = new HtmlParser().Parse(File.OpenRead("Data/billDocumentIndex.html"));
            IEnumerable <BillDocument> actual = BillDocumentServiceImpl.FindBillDocuments(billDocumentIndex);

            actual.Should().BeEquivalentTo(EXPECTED_BILL_DOCUMENTS);
        }
        public BillDocumentServiceTest()
        {
            var orangeRocklandClient = A.Fake <OrangeRocklandClient>();

            billDocumentService = new BillDocumentServiceImpl(orangeRocklandClient);
            billDocumentClient  = A.Fake <BillDocumentClient>();

            A.CallTo(() => orangeRocklandClient.BillDocuments).Returns(billDocumentClient);
        }
        public void ExtractEnergyPurchased()
        {
            FileStream documentContents = File.OpenRead("Data/billEnergyPurchased.pdf");
            var        billDocument     = new BillDocument {
                AccountId = ACCOUNT_ID, PublishingDate = new LocalDate(2017, 10, 18)
            };
            int actual = BillDocumentServiceImpl.ExtractEnergyPurchasedOrSold(billDocument, documentContents);

            actual.Should().Be(535);
        }
 public void FindBillDocumentForBillingInterval()
 {
     BillDocumentServiceImpl.FindBillDocumentForBillingInterval(EXPECTED_BILL_DOCUMENTS, new LocalDate(2018, 3, 18))
     .PublishingDate.Should().Be(new LocalDate(2018, 3, 20));
     BillDocumentServiceImpl.FindBillDocumentForBillingInterval(EXPECTED_BILL_DOCUMENTS, new LocalDate(2018, 3, 19))
     .PublishingDate.Should().Be(new LocalDate(2018, 3, 20));
     BillDocumentServiceImpl.FindBillDocumentForBillingInterval(EXPECTED_BILL_DOCUMENTS, new LocalDate(2018, 3, 20))
     .PublishingDate.Should().Be(new LocalDate(2018, 3, 20));
     BillDocumentServiceImpl.FindBillDocumentForBillingInterval(EXPECTED_BILL_DOCUMENTS, new LocalDate(2018, 2, 21))
     .PublishingDate.Should().Be(new LocalDate(2018, 3, 20));
     BillDocumentServiceImpl.FindBillDocumentForBillingInterval(EXPECTED_BILL_DOCUMENTS, new LocalDate(2018, 2, 20))
     .PublishingDate.Should().Be(new LocalDate(2018, 2, 20));
 }