public void ThenDocumentStringAddedSuccessfully()
        {
            var excelDocumentStringFormatter = new ExcelDocumentStringFormatter();
            string documentString = @"This is an example
document string for use
in testing";

            using (var workbook = new XLWorkbook())
            {
                IXLWorksheet worksheet = workbook.AddWorksheet("SHEET1");
                int row = 7;
                excelDocumentStringFormatter.Format(worksheet, documentString, ref row);

                Check.That(worksheet.Cell("D7").Value).IsEqualTo("This is an example");
                Check.That(worksheet.Cell("D8").Value).IsEqualTo("document string for use");
                Check.That(worksheet.Cell("D9").Value).IsEqualTo("in testing");
                Check.That(row).IsEqualTo(10);
            }
        }
Ejemplo n.º 2
0
        public void ThenDocumentStringAddedSuccessfully()
        {
            var    excelDocumentStringFormatter = new ExcelDocumentStringFormatter();
            string documentString = @"This is an example
document string for use
in testing";

            using (var workbook = new XLWorkbook())
            {
                IXLWorksheet worksheet = workbook.AddWorksheet("SHEET1");
                int          row       = 7;
                excelDocumentStringFormatter.Format(worksheet, documentString, ref row);

                worksheet.Cell("D7").Value.ShouldEqual("This is an example");
                worksheet.Cell("D8").Value.ShouldEqual("document string for use");
                worksheet.Cell("D9").Value.ShouldEqual("in testing");
                row.ShouldEqual(10);
            }
        }
Ejemplo n.º 3
0
 public ExcelStepFormatter(ExcelTableFormatter excelTableFormatter,
                           ExcelDocumentStringFormatter excelDocumentStringFormatter)
 {
     this.excelTableFormatter = excelTableFormatter;
     this.excelDocumentStringFormatter = excelDocumentStringFormatter;
 }