@@ -28,6 +28,7 @@ public void UpdateDefaultOptionsOnProcessingContext_AlwaysNewInstance()
2828 {
2929 var option = new ShapeOptions ( )
3030 {
31+ ClippingOperation = ClippingOperation . Intersection ,
3132 IntersectionRule = IntersectionRule . NonZero
3233 } ;
3334 var config = new Configuration ( ) ;
@@ -36,13 +37,19 @@ public void UpdateDefaultOptionsOnProcessingContext_AlwaysNewInstance()
3637
3738 context . SetShapeOptions ( o =>
3839 {
39- Assert . Equal ( IntersectionRule . NonZero , o . IntersectionRule ) ; // has origional values
40+ Assert . Equal ( ClippingOperation . Intersection , o . ClippingOperation ) ; // has original values
41+ Assert . Equal ( IntersectionRule . NonZero , o . IntersectionRule ) ;
42+
43+ o . ClippingOperation = ClippingOperation . Xor ;
4044 o . IntersectionRule = IntersectionRule . EvenOdd ;
4145 } ) ;
4246
4347 ShapeOptions returnedOption = context . GetShapeOptions ( ) ;
48+
49+ Assert . Equal ( ClippingOperation . Xor , returnedOption . ClippingOperation ) ;
4450 Assert . Equal ( IntersectionRule . EvenOdd , returnedOption . IntersectionRule ) ;
45- Assert . Equal ( IntersectionRule . NonZero , option . IntersectionRule ) ; // hasn't been mutated
51+ Assert . Equal ( ClippingOperation . Intersection , option . ClippingOperation ) ; // hasn't been mutated
52+ Assert . Equal ( IntersectionRule . NonZero , option . IntersectionRule ) ;
4653 }
4754
4855 [ Fact ]
@@ -61,20 +68,25 @@ public void UpdateDefaultOptionsOnConfiguration_AlwaysNewInstance()
6168 {
6269 var option = new ShapeOptions ( )
6370 {
71+ ClippingOperation = ClippingOperation . Intersection ,
6472 IntersectionRule = IntersectionRule . NonZero
6573 } ;
6674 var config = new Configuration ( ) ;
6775 config . SetShapeOptions ( option ) ;
6876
6977 config . SetShapeOptions ( o =>
7078 {
71- Assert . Equal ( IntersectionRule . NonZero , o . IntersectionRule ) ; // has origional values
79+ Assert . Equal ( ClippingOperation . Intersection , o . ClippingOperation ) ; // has original values
80+ Assert . Equal ( IntersectionRule . NonZero , o . IntersectionRule ) ;
81+ o . ClippingOperation = ClippingOperation . Xor ;
7282 o . IntersectionRule = IntersectionRule . EvenOdd ;
7383 } ) ;
7484
7585 ShapeOptions returnedOption = config . GetShapeOptions ( ) ;
86+ Assert . Equal ( ClippingOperation . Xor , returnedOption . ClippingOperation ) ;
7687 Assert . Equal ( IntersectionRule . EvenOdd , returnedOption . IntersectionRule ) ;
77- Assert . Equal ( IntersectionRule . NonZero , option . IntersectionRule ) ; // hasn't been mutated
88+ Assert . Equal ( ClippingOperation . Intersection , option . ClippingOperation ) ; // hasn't been mutated
89+ Assert . Equal ( IntersectionRule . NonZero , option . IntersectionRule ) ;
7890 }
7991
8092 [ Fact ]
0 commit comments