diff --git a/test/chart/pie_chart/pie_chart_painter_test.dart b/test/chart/pie_chart/pie_chart_painter_test.dart index 668f4f76a..839d6d671 100644 --- a/test/chart/pie_chart/pie_chart_painter_test.dart +++ b/test/chart/pie_chart/pie_chart_painter_test.dart @@ -165,73 +165,6 @@ void main() { Utils.changeInstance(utilsMainInstance); }); - test('test 2', () { - const viewSize = Size(200, 200); - - const radius = 30.0; - const centerSpace = 10.0; - final sections = [ - PieChartSectionData( - color: MockData.color2, - radius: radius, - value: 10, - borderSide: const BorderSide( - color: MockData.color3, - width: 3, - ), - ), - ]; - final data = PieChartData( - sections: sections, - ); - - final barChartPainter = PieChartPainter(); - final holder = - PaintHolder(data, data, TextScaler.noScaling); - - final mockCanvasWrapper = MockCanvasWrapper(); - when(mockCanvasWrapper.size).thenAnswer((realInvocation) => viewSize); - when(mockCanvasWrapper.canvas).thenReturn(MockCanvas()); - barChartPainter.drawSections(mockCanvasWrapper, [360], 10, holder); - - final rect = Rect.fromCircle( - center: viewSize.center(Offset.zero), - radius: radius + centerSpace, - ); - final results = verifyInOrder([ - mockCanvasWrapper.saveLayer( - rect, - any, - ), - mockCanvasWrapper.drawCircle( - const Offset(100, 100), - 10 + 30, - captureAny, - ), - mockCanvasWrapper.drawCircle( - const Offset(100, 100), - 10, - captureAny, - ), - mockCanvasWrapper.restore(), - ]); - final result = results[1]; - expect(result.callCount, 1); - expect((result.captured.single as Paint).color, MockData.color2); - expect((result.captured.single as Paint).style, PaintingStyle.fill); - - final result2 = verify( - mockCanvasWrapper.drawCircle( - const Offset(100, 100), - 10 + (3 / 2), - captureAny, - ), - ); - expect(result2.callCount, 1); - expect((result2.captured.single as Paint).color, MockData.color3); - expect((result2.captured.single as Paint).strokeWidth, 3); - expect((result2.captured.single as Paint).style, PaintingStyle.stroke); - }); }); group('drawSections()', () {