public void TestGeneratedRandomFileNameWithListSimpleClass2AsData() { List <SimpleClass1> lstSimpleClass1 = new List <SimpleClass1>(); lstSimpleClass1.Add(new SimpleClass1 { Field1 = "Field 1 Line 1", Field2 = "Field 2 Line 1" }); lstSimpleClass1.Add(new SimpleClass1 { Field1 = "Field 1 Line 2", Field2 = "Field 2 Line 2" }); lstSimpleClass1.Add(new SimpleClass1 { Field1 = "Field 1 Line 3", Field2 = "Field 2 Line 3" }); String generatedReportFileName; XlReportGenerator.Generate(lstSimpleClass1, "D:\\Test", "Report 1235", out generatedReportFileName); }
public void TestGeneratedRandomFileNameWithComplexClass2AsData() { List <SimpleClass1> lstSimpleClass1 = new List <SimpleClass1>(); lstSimpleClass1.Add(new SimpleClass1 { Field1 = "Field 1 Line 1", Field2 = "Field 2 Line 1" }); lstSimpleClass1.Add(new SimpleClass1 { Field1 = "Field 1 Line 2", Field2 = "Field 2 Line 2" }); lstSimpleClass1.Add(new SimpleClass1 { Field1 = "Field 1 Line 3", Field2 = "Field 2 Line 3" }); ComplexClass2 data = new ComplexClass2() { SC0 = "Hello 0", SC1 = lstSimpleClass1, SC2 = "Hello 3" }; String generatedReportFileName; XlReportGenerator.Generate(data, "D:\\Test", "Report 1235", out generatedReportFileName); }
public void TestGeneratedRandomFileNameWithSimpleClass1AsDataWithTemplate() { List <SimpleClass1> datas = new List <SimpleClass1>() { new SimpleClass1() { Field1 = "Soap", Field2 = "Bath Ware", Field4 = new Decimal(123.4) }, new SimpleClass1() { Field1 = "Shampoo", Field2 = "Bath Ware", Field4 = new Decimal(123.4) }, new SimpleClass1() { Field1 = "Shampoo", Field2 = "Bath Ware", Field4 = new Decimal(123.4) }, }; String generatedReportFileName; XlReportGenerator.Generate(datas, "D:\\Test", "Sheet1", out generatedReportFileName, "Test", "Yusak", "Test Subject", "Test Keywords", @"D:\\Test\\Template.xlsx", "", EnumExcelType.XLSX); }
public void TestGeneratedRandomFileNameWithSimpleClass2AsData() { SimpleClass2 data = new SimpleClass2() { Name = "Tigabelas", Age = 20, BOD = new DateTime(1994, 04, 20) }; String generatedReportFileName; XlReportGenerator.Generate(data, "D:\\Test", "Report 1235", out generatedReportFileName); }
public void TestGeneratedRandomFileNameWithSimpleClass1AsData() { SimpleClass1 data = new SimpleClass1() { Field1 = "Field 1 Line 3", Field2 = "Field 2 Line 3", Field4 = new Decimal(123.4), Field5 = "Hello" }; String generatedReportFileName; XlReportGenerator.Generate(data, "D:\\Test", "Report 1234", out generatedReportFileName); }
public void XlReportGeneratorCreateReportCase() { //LoadPeriods ReportGenerator xlReportGenerator = new XlReportGenerator(); xlReportGenerator.LoadPeriods(); //CreateReport string reportName = "testReportGeneratorReport"; string reportPath = "/home/olamide/Projects/BrewLog/BrewingModel/bin/Debug/reports"; xlReportGenerator.CreateReport("2018", Month.September, reportName, reportPath); XlReport xlReport = (XlReport)xlReportGenerator.Report; //Carry out test Assert.AreEqual("Brewing forms", xlReport.XlReportWorksheet.Name); }
public void TestGeneratedRandomFileNameWithComplexClass1AsData() { ComplexClass1 data = new ComplexClass1() { SC1 = new SimpleClass1() { Field1 = "Hello", Field2 = "World" }, SC2 = new SimpleClass2() { Name = "Tigabelas", Age = 20, BOD = new DateTime(1994, 04, 20) }, SC3 = "Hello" }; String generatedReportFileName; XlReportGenerator.Generate(data, "D:\\Test", "Report 1235", out generatedReportFileName); }
public AppForm() { //Initialize picturebox static parameters ProcessViewPictureBox.ImagesFolderPath = imagesFolderPath; ProcessViewPictureBox.ProcessViewScale = processViewScale; // Default Constructor Text = "Windows Forms app"; // Model & Controller for process parameters views brewingProcessHandler = BrewingProcessHandler.GetInstance(); guiModel = brewingProcessHandler; // Register with BrewingProcessHandler Subject guiModel.Attach(this); brewParametersGuiModel = new BrewParametersGuiModel(); guiProcessParametersModel = brewParametersGuiModel; ReportGenerator reportGenerator = new XlReportGenerator(); guiController = new BrewLoggerGuiController(guiProcessParametersModel, this, reportGenerator); // Register with BrewParametersGuiModel Subject guiProcessParametersModel.Attach(this); // Model for process equipment view //processViewModel = new ProcessViewModel(); //processViewModel.AddObserver(this); this.Size = new Size(1200, 800); //Setup GUI elements SetupProcessView(); SetupNewBrewView(); SetupBrewsListView(); SetupProcessEquipmentParametersView(); SetupReportView(); render(); }