Пример #1
0
 private CompareFile NewCompareFile(string fileName)
 {
     return(new CompareFile("fileName",
                            new List <CompareItem>()
     {
         CompareItem.WithData1("property", new List <CompareValue>()
         {
             new CompareValue("name", "value")
         })
     }));
 }
            public void File_NotExist()
            {
                var service  = Container.GetExportedValue <IExcelReportDocumentType>();
                var document = service.New();

                document.NewSheet(
                    new CompareFile("test1",
                                    new List <CompareItem>()
                {
                    CompareItem.WithData1("property", new List <CompareValue>()
                    {
                        new CompareValue("name", "value")
                    })
                }),
                    "path1", "path2", new ExcelReportConfigurationDocument());

                Assert.IsFalse(File.Exists(EXCEL_REPORT_FILE_NAME));
                service.Save(document, EXCEL_REPORT_FILE_NAME);
                Assert.IsTrue(File.Exists(EXCEL_REPORT_FILE_NAME));
            }
Пример #3
0
        private CompareItem CompareWithNothing(Property property)
        {
            Preconditions.NotNull(property, "property");

            return(CompareItem.WithData1(property.Name, property.Select(item => FieldToCompare(item.Value)).ToList()));
        }