@@ -15,12 +15,12 @@ namespace FwAvaloniaTests
1515 /// The shared <see cref="RegionFieldKind"/>→control dispatch both the detail-pane region view
1616 /// and the browse in-cell editor route through. These pin that one switch produces the right control
1717 /// per surviving kind (Text / Chooser / ReferenceVector / Literal / Custom / Unsupported), and that
18- /// the all-nullable <see cref="RegionSliceFactoryContext "/> serves both surfaces — the browse cell
18+ /// the all-nullable <see cref="SliceFactoryContext "/> serves both surfaces — the browse cell
1919 /// passes null menu/link callbacks and suppresses the WS-abbreviation gutter while the detail pane
2020 /// passes the full set — without either surface hand-rolling its own dispatch.
2121 /// </summary>
2222 [ TestFixture ]
23- public class RegionSliceFactoryTests
23+ public class SliceFactoryTests
2424 {
2525 private static RegionField Field ( RegionFieldKind kind , string selectedOption = null ,
2626 System . Func < Control > controlFactory = null )
@@ -33,22 +33,22 @@ private static RegionField Field(RegionFieldKind kind, string selectedOption = n
3333
3434 [ AvaloniaTest ]
3535 public void TextKind_BuildsMultiWsTextField ( )
36- => Assert . That ( RegionSliceFactory . Build ( Field ( RegionFieldKind . Text ) , "Auto.Id" , null ) ,
36+ => Assert . That ( SliceFactory . Build ( Field ( RegionFieldKind . Text ) , "Auto.Id" , null ) ,
3737 Is . InstanceOf < FwMultiWsTextField > ( ) ) ;
3838
3939 [ AvaloniaTest ]
4040 public void ChooserKind_BuildsChooserField ( )
41- => Assert . That ( RegionSliceFactory . Build ( Field ( RegionFieldKind . Chooser ) , "Auto.Id" , null ) ,
41+ => Assert . That ( SliceFactory . Build ( Field ( RegionFieldKind . Chooser ) , "Auto.Id" , null ) ,
4242 Is . InstanceOf < FwChooserField > ( ) ) ;
4343
4444 [ AvaloniaTest ]
4545 public void ReferenceVectorKind_BuildsReferenceVectorField ( )
46- => Assert . That ( RegionSliceFactory . Build ( Field ( RegionFieldKind . ReferenceVector ) , "Auto.Id" , null ) ,
46+ => Assert . That ( SliceFactory . Build ( Field ( RegionFieldKind . ReferenceVector ) , "Auto.Id" , null ) ,
4747 Is . InstanceOf < FwReferenceVectorField > ( ) ) ;
4848
4949 [ AvaloniaTest ]
5050 public void UnsupportedKind_BuildsUnsupportedTextBlock ( )
51- => Assert . That ( RegionSliceFactory . Build ( Field ( RegionFieldKind . Unsupported ) , "Auto.Id" , null ) ,
51+ => Assert . That ( SliceFactory . Build ( Field ( RegionFieldKind . Unsupported ) , "Auto.Id" , null ) ,
5252 Is . InstanceOf < TextBlock > ( ) ) ;
5353
5454 // Literal: a static text renderer (legacy MessageSlice) — the label/message text is the
@@ -62,21 +62,21 @@ public void LiteralKind_BuildsStaticTextBlock_ShowingTheLabel()
6262 automationId : "Auto.Lit" , localizationKey : null , routing : SurfaceRouting . Product ,
6363 values : new List < RegionWsValue > { new RegionWsValue ( "" , "Read this carefully:" ) } ,
6464 options : null , selectedOptionKey : null , isEditable : false ) ;
65- var control = RegionSliceFactory . Build ( field , "Auto.Lit" , null ) ;
65+ var control = SliceFactory . Build ( field , "Auto.Lit" , null ) ;
6666 Assert . That ( control , Is . InstanceOf < TextBlock > ( ) ) ;
6767 Assert . That ( ( ( TextBlock ) control ) . Text , Is . EqualTo ( "Read this carefully:" ) ) ;
6868 }
6969
7070 [ AvaloniaTest ]
7171 public void CustomKind_NullFactory_DegradesToUnsupportedRow ( )
72- => Assert . That ( RegionSliceFactory . Build ( Field ( RegionFieldKind . Custom , controlFactory : null ) ,
72+ => Assert . That ( SliceFactory . Build ( Field ( RegionFieldKind . Custom , controlFactory : null ) ,
7373 "Auto.Id" , null ) , Is . InstanceOf < TextBlock > ( ) ) ;
7474
7575 [ AvaloniaTest ]
7676 public void CustomKind_FactoryControl_IsReturned ( )
7777 {
7878 var marker = new Border ( ) ;
79- var control = RegionSliceFactory . Build (
79+ var control = SliceFactory . Build (
8080 Field ( RegionFieldKind . Custom , controlFactory : ( ) => marker ) , "Auto.Id" , null ) ;
8181 Assert . That ( control , Is . SameAs ( marker ) ) ;
8282 }
@@ -86,9 +86,9 @@ public void BrowseStyleContext_TextField_SuppressesWritingSystemAbbreviation()
8686 {
8787 // The dense browse cell context (null callbacks, no abbreviation gutter) must still build a
8888 // usable text field — the same control the detail pane gets, just configured for the cell.
89- var browseContext = new RegionSliceFactoryContext (
89+ var browseContext = new SliceFactoryContext (
9090 editContext : null , writingSystemFocused : _ => { } , showWritingSystemAbbreviation : false ) ;
91- Assert . That ( RegionSliceFactory . Build ( Field ( RegionFieldKind . Text ) , "Auto.Id" , browseContext ) ,
91+ Assert . That ( SliceFactory . Build ( Field ( RegionFieldKind . Text ) , "Auto.Id" , browseContext ) ,
9292 Is . InstanceOf < FwMultiWsTextField > ( ) ) ;
9393 }
9494 }
0 commit comments