Esempio n. 1
0
        public void SeriesType_ReturnsChartTypeOfTheSeries()
        {
            // Arrange
            IChart chart   = (IChart)_fixture.Pre021.Slides[0].Shapes.First(sp => sp.Id == 3);
            Series series2 = chart.SeriesCollection[1];
            Series series3 = chart.SeriesCollection[2];

            // Act
            ChartType seriesChartType2 = series2.Type;
            ChartType seriesChartType3 = series3.Type;

            // Assert
            seriesChartType2.Should().Be(ChartType.BarChart);
            seriesChartType3.Should().Be(ChartType.ScatterChart);
        }
Esempio n. 2
0
        public void Type_ReturnsChartType()
        {
            // Arrange
            IChart chartCase1 = (IChart)_fixture.Pre021.Slides[1].Shapes.First(sp => sp.Id == 3);
            IChart chartCase2 = (IChart)_fixture.Pre021.Slides[2].Shapes.First(sp => sp.Id == 4);
            IChart chartCase3 = (IChart)_fixture.Pre013.Slides[0].Shapes.First(sp => sp.Id == 5);
            IChart chartCase4 = (IChart)_fixture.Pre009.Slides[2].Shapes.First(sp => sp.Id == 7);

            // Act
            ChartType chartTypeCase1 = chartCase1.Type;
            ChartType chartTypeCase2 = chartCase2.Type;
            ChartType chartTypeCase3 = chartCase3.Type;
            ChartType chartTypeCase4 = chartCase4.Type;

            // Assert
            chartTypeCase1.Should().Be(ChartType.BubbleChart);
            chartTypeCase2.Should().Be(ChartType.ScatterChart);
            chartTypeCase3.Should().Be(ChartType.Combination);
            chartTypeCase4.Should().Be(ChartType.PieChart);
        }