@@ -333,32 +333,4 @@ public void BuildWithDifferentVersionNumber(string id, string config, string dis
333333 Assert . IsTrue ( DotnetInternal . Build ( projectFile , config , properties : buildProps , msbuildWarningsAsErrors : true ) ,
334334 $ "Project { Path . GetFileName ( projectFile ) } failed to build. Check test output/attachments for errors.") ;
335335 }
336-
337- // This test is super temporary and is just for the interim
338- // while we productize the CollectionViewHandler2. Once we
339- // ship it as the default, this test will fail and can be deleted.
340- [ Test ]
341- [ TestCase ( "maui" , DotNetCurrent , "" , false ) ]
342- [ TestCase ( "maui" , DotNetCurrent , "--sample-content" , true ) ]
343- public void SampleShouldHaveHandler2Registered ( string id , string framework , string additionalDotNetNewParams , bool shouldHaveHandler2 )
344- {
345- var projectDir = TestDirectory ;
346- var programFile = Path . Combine ( projectDir , "MauiProgram.cs" ) ;
347-
348- Assert . IsTrue ( DotnetInternal . New ( id , projectDir , framework , additionalDotNetNewParams ) ,
349- $ "Unable to create template { id } . Check test output for errors.") ;
350-
351- var programContents = File . ReadAllText ( programFile ) ;
352-
353- if ( shouldHaveHandler2 )
354- {
355- AssertContains ( "#if IOS || MACCATALYST" , programContents ) ;
356- AssertContains ( "handlers.AddHandler<Microsoft.Maui.Controls.CollectionView, Microsoft.Maui.Controls.Handlers.Items2.CollectionViewHandler2>();" , programContents ) ;
357- }
358- else
359- {
360- AssertDoesNotContain ( "#if IOS || MACCATALYST" , programContents ) ;
361- AssertDoesNotContain ( "handlers.AddHandler<Microsoft.Maui.Controls.CollectionView, Microsoft.Maui.Controls.Handlers.Items2.CollectionViewHandler2>();" , programContents ) ;
362- }
363- }
364336}
0 commit comments