Beispiel #1
0
        override protected void RealExecute(IExcelTemplateView view)
        {
            if (view.RenderedArea == null)
            {
                StepsErrorMessages.Add("Rendered area must not be null");
            }
            else
            {
                if (view.RenderedArea.Width != 3 || view.RenderedArea.Height != 10)
                {
                    StepsErrorMessages.Add("Rendered area must be 3*10");
                }

                if (view.RenderedRange[1, 1].Value != 1)
                {
                    StepsErrorMessages.Add("Cell [1, 1] must contains '1'");
                }
                if (view.RenderedRange[1, 2].Value != "Product 1")
                {
                    StepsErrorMessages.Add("Cell [1, 2] must contains 'Product 1'");
                }
                if (view.RenderedRange[1, 3].Value != 11.0)
                {
                    StepsErrorMessages.Add("Cell [1, 3] must contains '11.00'");
                }

                if (view.RenderedRange[5, 1].Value != 5)
                {
                    StepsErrorMessages.Add("Cell [5, 1] must contains '5'");
                }
                if (view.RenderedRange[5, 2].Value != "Product 5")
                {
                    StepsErrorMessages.Add("Cell [5, 2] must contains 'Product 5'");
                }
                if (view.RenderedRange[5, 3].Value != 55.0)
                {
                    StepsErrorMessages.Add("Cell [5, 3] must contains '55.00'");
                }

                if (view.RenderedRange[10, 1].Value != 10)
                {
                    StepsErrorMessages.Add("Cell [10, 1] must contains '10'");
                }
                if (view.RenderedRange[10, 2].Value != "Product 10")
                {
                    StepsErrorMessages.Add("Cell [10, 2] must contains 'Product 10'");
                }
                if (view.RenderedRange[10, 3].Value != 100.0)
                {
                    StepsErrorMessages.Add("Cell [10, 3] must contains '100.00'");
                }
            }
        }
Beispiel #2
0
        override protected void RealExecute(IExcelTemplateView view)
        {
            if (view.RenderedArea == null)
            {
                StepsErrorMessages.Add("Rendered area must not be null");
            }
            else
            {
                if (view.RenderedArea.Width != 4 || view.RenderedArea.Height != 4)
                {
                    StepsErrorMessages.Add("Rendered area must be 4*4");
                }

                if (view.RenderedRange[1, 1].Value != 1)
                {
                    StepsErrorMessages.Add("Cell [1, 1] must contains '1'");
                }
                if (view.RenderedRange[1, 2].Value != "First Shop")
                {
                    StepsErrorMessages.Add("Cell [1, 2] must contains 'First Shop'");
                }
                if (view.RenderedRange[1, 4].Value != "First Shop Reception Phone number")
                {
                    StepsErrorMessages.Add("Cell [1, 4] must contains 'First Shop Reception Phone number'");
                }

                if (view.RenderedRange[2, 1].Value != 2)
                {
                    StepsErrorMessages.Add("Cell [2, 1] must contains '2'");
                }
                if (view.RenderedRange[2, 2].Value != "Second Shop")
                {
                    StepsErrorMessages.Add("Cell [2, 2] must contains 'Second Shop'");
                }
                if (view.RenderedRange[2, 4].Value != "Second Shop Reception Phone number")
                {
                    StepsErrorMessages.Add("Cell [2, 4] must contains 'Second Shop Reception Phone number'");
                }

                if (view.RenderedRange[4, 1].Value != 4)
                {
                    StepsErrorMessages.Add("Cell [4, 1] must contains '4'");
                }
                if (view.RenderedRange[4, 2].Value != "Fourth Shop")
                {
                    StepsErrorMessages.Add("Cell [4, 2] must contains 'Fourth Shop'");
                }
                if (view.RenderedRange[4, 4].Value != "Fourth Shop Reception Phone number")
                {
                    StepsErrorMessages.Add("Cell [4, 4] must contains 'Fourth Shop Reception Phone number'");
                }
            }
        }
Beispiel #3
0
        override protected void RealExecute(IExcelTemplateView view)
        {
            if (view.RenderedArea == null)
            {
                StepsErrorMessages.Add("Rendered area must not be null");
            }
            else
            {
                if (view.RenderedArea == null || view.RenderedArea.Width != 4 || view.RenderedArea.Height != 6)
                {
                    StepsErrorMessages.Add("Rendered area must be 4*6");
                }

                if (view.RenderedRange[1, 1].Value != "ID")
                {
                    StepsErrorMessages.Add("First cell must contains 'ID'");
                }

                if (view.RenderedRange[1, 4].Value != "Reception Phone Number")
                {
                    StepsErrorMessages.Add("Cells [1, 3] must contains 'Reception Phone Number'");
                }

                if (view.RenderedRange[2, 1].Value != 1)
                {
                    StepsErrorMessages.Add("Cells [2, 1] must contains '1'");
                }

                if (view.RenderedRange[2, 4].Value != "First Shop Reception Phone number")
                {
                    StepsErrorMessages.Add("Cells [2, 3] must contains 'First Shop Reception Phone number'");
                }

                if (view.RenderedRange[4, 2].Value != "Third Shop")
                {
                    StepsErrorMessages.Add("Cells [4, 2] must contains 'Third Shop'");
                }

                if (view.RenderedRange[4, 4].Value != "Third Shop Reception Phone number")
                {
                    StepsErrorMessages.Add("Cells [2, 3] must contains 'Third Shop Reception Phone number'");
                }

                if (view.RenderedRange[6, 1].Value != "Shops")
                {
                    StepsErrorMessages.Add("First cell of last row must contains 'Shops'");
                }
            }
        }
Beispiel #4
0
        override protected void RealExecute(IExcelTemplateView view)
        {
            ExcelTemplateView excelView = view as ExcelTemplateView;

            if (excelView.RenderedArea == null || excelView.Renderer == null)
            {
                StepsErrorMessages.Add("Rendered area must not be null");
                return;
            }

            // Header
            if (excelView.Renderer.HeaderPartRenderer == null || excelView.Renderer.HeaderPartRenderer.RenderedArea == null)
            {
                StepsErrorMessages.Add("Header rendered area must not be null");
            }
            else
            {
                if (excelView.Renderer.HeaderPartRenderer.Width != 4 || excelView.Renderer.HeaderPartRenderer.Height != 2)
                {
                    StepsErrorMessages.Add("Header rendered area must 2*1");
                }
                if (excelView.Renderer.HeaderPartRenderer.RenderedRange[1, 1].Value != "Shops")
                {
                    StepsErrorMessages.Add("Header Cell[1,1] must contains 'ID'");
                }
                if (excelView.Renderer.HeaderPartRenderer.RenderedRange[2, 1].Value != "ID")
                {
                    StepsErrorMessages.Add("Header Cell[2,1] must contains 'ID'");
                }
            }

            // Body
            if (excelView.Renderer.BodyPartRenderer == null || excelView.Renderer.BodyPartRenderer.RenderedArea == null)
            {
                StepsErrorMessages.Add("Body rendered area must not be null");
            }
            else
            {
                if (excelView.Renderer.BodyPartRenderer.Width != 4 || excelView.Renderer.BodyPartRenderer.Height != 4)
                {
                    StepsErrorMessages.Add("Body Rendered area must be 4*4");
                }
                if (excelView.Renderer.BodyPartRenderer.RenderedRange[1, 1].Value != 1)
                {
                    StepsErrorMessages.Add("Body First cell must contains '1'");
                }
                if (excelView.Renderer.BodyPartRenderer.RenderedRange[4, 4].Value != "Fourth Shop Reception Phone number")
                {
                    StepsErrorMessages.Add("Body Last cell must contains 'Fourth Shop Reception Phone number'");
                }
            }

            // Footer
            if (excelView.Renderer.FooterPartRenderer == null || excelView.Renderer.FooterPartRenderer.RenderedArea == null)
            {
                StepsErrorMessages.Add("Footer rendered area must not be null");
            }
            else
            {
                if (excelView.Renderer.FooterPartRenderer.Width != 4 || excelView.Renderer.HeaderPartRenderer.Height != 2)
                {
                    StepsErrorMessages.Add("Footer rendered area must 4*2");
                }
                if (excelView.Renderer.FooterPartRenderer.RenderedRange[1, 1].Value != "Footer")
                {
                    StepsErrorMessages.Add("Footer Cell[1,1] must contains 'Footer'");
                }
                if (excelView.Renderer.FooterPartRenderer.RenderedRange[2, 1].Value != "Shops")
                {
                    StepsErrorMessages.Add("Footer Cell[2,1] must contains 'Shops'");
                }
            }
        }
Beispiel #5
0
        override protected void RealExecute(IExcelTemplateView view)
        {
            if (view.RenderedArea == null)
            {
                StepsErrorMessages.Add("Rendered area must not be null");
            }
            else
            {
                if (view.RenderedArea == null || view.RenderedArea.Width != 4 || view.RenderedArea.Height != 8)
                {
                    StepsErrorMessages.Add("Rendered area must be 4*8");
                }

                if (view.RenderedRange[1, 1].Value != "Shops")
                {
                    StepsErrorMessages.Add("Cell[1,1] must contains 'Shops'");
                }

                if (view.RenderedRange[2, 1].Value != "ID")
                {
                    StepsErrorMessages.Add("Cell[2,1] must contains 'ID'");
                }
                if (view.RenderedRange[2, 2].Value != "Name")
                {
                    StepsErrorMessages.Add("Cell[2,2] must contains 'Address'");
                }
                if (view.RenderedRange[2, 3].Value != "Address")
                {
                    StepsErrorMessages.Add("Cell[2,3] must contains 'ID'");
                }
                if (view.RenderedRange[2, 4].Value != "Reception Phone Number")
                {
                    StepsErrorMessages.Add("Cell[2,4] must contains 'Reception Phone Number'");
                }

                if (view.RenderedRange[4, 1].Value != 2)
                {
                    StepsErrorMessages.Add("Cell[4,1] must contains '2'");
                }
                if (view.RenderedRange[4, 2].Value != "Second Shop")
                {
                    StepsErrorMessages.Add("Cell[4,2] must contains 'Second Shop'");
                }
                if (view.RenderedRange[4, 3].Value != "2 Shops Road ShopCity")
                {
                    StepsErrorMessages.Add("Cell[4,3] must contains '2 Shops Road ShopCity'");
                }
                if (view.RenderedRange[4, 4].Value != "Second Shop Reception Phone number")
                {
                    StepsErrorMessages.Add("Cell[4,4] must contains 'Second Shop Reception Phone number'");
                }

                if (view.RenderedRange[7, 1].Value != "Footer")
                {
                    StepsErrorMessages.Add("Cell[7,4] must contains 'Shops'");
                }
                if (view.RenderedRange[8, 1].Value != "Shops")
                {
                    StepsErrorMessages.Add("Cell[8,4] must contains 'Shops'");
                }
            }
        }