diff --git a/packages/pinball_components/test/src/components/shapes/arc_shape_test.dart b/packages/pinball_components/test/src/components/shapes/arc_shape_test.dart index cd3e03fb..6cf4ca88 100644 --- a/packages/pinball_components/test/src/components/shapes/arc_shape_test.dart +++ b/packages/pinball_components/test/src/components/shapes/arc_shape_test.dart @@ -37,7 +37,7 @@ void main() { } }); - test('returns object with updated center when center is passed', () { + test('returns object with updated properties when are passed', () { final arcShapeExpected = ArcShape( center: Vector2.all(10), arcRadius: 10, @@ -58,72 +58,5 @@ void main() { ); } }); - - test('returns object with updated arcRadius when majorRadius is passed', - () { - final arcShapeExpected = ArcShape( - center: Vector2.all(10), - arcRadius: 12, - angle: 2 * math.pi, - rotation: 0, - ); - final arcShapeCopied = ArcShape( - center: Vector2.all(10), - arcRadius: 10, - angle: 2 * math.pi, - rotation: 0, - ).copyWith(arcRadius: 12); - - for (var index = 0; index < arcShapeCopied.vertices.length; index++) { - expect( - arcShapeCopied.vertices[index], - equals(arcShapeExpected.vertices[index]), - ); - } - }); - - test('returns object with updated angle when angle is passed', () { - final arcShapeExpected = ArcShape( - center: Vector2.all(10), - arcRadius: 10, - angle: 2 * math.pi, - rotation: 0, - ); - final arcShapeCopied = ArcShape( - center: Vector2.all(10), - arcRadius: 10, - angle: math.pi, - rotation: 0, - ).copyWith(angle: 2 * math.pi); - - for (var index = 0; index < arcShapeCopied.vertices.length; index++) { - expect( - arcShapeCopied.vertices[index], - equals(arcShapeExpected.vertices[index]), - ); - } - }); - - test('returns object with updated rotation when rotation is passed', () { - final arcShapeExpected = ArcShape( - center: Vector2.all(10), - arcRadius: 10, - angle: math.pi, - rotation: math.pi, - ); - final arcShapeCopied = ArcShape( - center: Vector2.all(10), - arcRadius: 10, - angle: math.pi, - rotation: 0, - ).copyWith(rotation: math.pi); - - for (var index = 0; index < arcShapeCopied.vertices.length; index++) { - expect( - arcShapeCopied.vertices[index], - equals(arcShapeExpected.vertices[index]), - ); - } - }); }); } diff --git a/packages/pinball_components/test/src/components/shapes/ellipse_shape_test.dart b/packages/pinball_components/test/src/components/shapes/ellipse_shape_test.dart index 53960b36..bc8c750f 100644 --- a/packages/pinball_components/test/src/components/shapes/ellipse_shape_test.dart +++ b/packages/pinball_components/test/src/components/shapes/ellipse_shape_test.dart @@ -46,7 +46,7 @@ void main() { } }); - test('returns object with updated center when center is passed', () { + test('returns object with updated properties when are passed', () { final ellipseShapeExpected = EllipseShape( center: Vector2.all(10), majorRadius: 10, @@ -67,52 +67,6 @@ void main() { ); } }); - - test('returns object with updated majorRadius when majorRadius is passed', - () { - final ellipseShapeExpected = EllipseShape( - center: Vector2.zero(), - majorRadius: 12, - minorRadius: 8, - ); - final ellipseShapeCopied = EllipseShape( - center: Vector2.zero(), - majorRadius: 10, - minorRadius: 8, - ).copyWith(majorRadius: 12); - - for (var index = 0; - index < ellipseShapeCopied.vertices.length; - index++) { - expect( - ellipseShapeCopied.vertices[index], - equals(ellipseShapeExpected.vertices[index]), - ); - } - }); - - test('returns object with updated minorRadius when minorRadius is passed', - () { - final ellipseShapeExpected = EllipseShape( - center: Vector2.zero(), - majorRadius: 12, - minorRadius: 5, - ); - final ellipseShapeCopied = EllipseShape( - center: Vector2.zero(), - majorRadius: 12, - minorRadius: 8, - ).copyWith(minorRadius: 5); - - for (var index = 0; - index < ellipseShapeCopied.vertices.length; - index++) { - expect( - ellipseShapeCopied.vertices[index], - equals(ellipseShapeExpected.vertices[index]), - ); - } - }); }); }); }