@@ -2412,20 +2412,12 @@ let sample16SolutionFoldersTest testAsset =
24122412 // There should be 3 items at the solution level - build.fsproj, a 'src' folder and a 'tests' folder
24132413 Expect.equal solutionData.Items.Length 3 " There should be 3 items in the solution"
24142414
2415- // The first item should be "build.fsproj
2415+ // The solution folders are first
2416+ // The first item should be the 'src' folder, which should contain proj1.fsproj
24162417 let firstItem = solutionData.Items[ 0 ]
2417- let expectedBuildProjectPath = Path.Combine( slnDir, " build.fsproj" )
2418- Expect.equal firstItem.Name expectedBuildProjectPath " Should have the expected build project path"
2418+ Expect.equal firstItem.Name " src" " Should have the src folder"
24192419
24202420 match firstItem.Kind with
2421- | InspectSln.MSBuildFormat items -> Expect.isEmpty items " we don't currently store anything here"
2422- | unexpected -> failtestf " Expected a project, but got %A " unexpected
2423-
2424- // The second item should be the 'src' folder, which should contain proj1.fsproj
2425- let secondItem = solutionData.Items[ 1 ]
2426- Expect.equal secondItem.Name " src" " Should have the src folder"
2427-
2428- match secondItem.Kind with
24292421 | InspectSln.Folder( solutionItems, _) ->
24302422 match solutionItems with
24312423 | [ {
@@ -2438,10 +2430,10 @@ let sample16SolutionFoldersTest testAsset =
24382430 | unexpected -> failtestf " Expected a folder, but got %A " unexpected
24392431
24402432 // The third item should be the 'src' folder, which should contain proj1.fsproj
2441- let thirdItem = solutionData.Items[ 2 ]
2442- Expect.equal thirdItem .Name " tests" " Should have the tests folder"
2433+ let secondItem = solutionData.Items[ 1 ]
2434+ Expect.equal secondItem .Name " tests" " Should have the tests folder"
24432435
2444- match thirdItem .Kind with
2436+ match secondItem .Kind with
24452437 | InspectSln.Folder( solutionItems, _) ->
24462438 match solutionItems with
24472439 | [ {
@@ -2453,6 +2445,16 @@ let sample16SolutionFoldersTest testAsset =
24532445 | _ -> failtestf " Expected one folder item, but got %A " solutionItems
24542446 | unexpected -> failtestf " Expected a folder, but got %A " unexpected
24552447
2448+ // Then projects at the root level of the solution.
2449+ // The first item should be "build.fsproj
2450+ let thirdItem = solutionData.Items[ 2 ]
2451+ let expectedBuildProjectPath = Path.Combine( slnDir, " build.fsproj" )
2452+ Expect.equal thirdItem.Name expectedBuildProjectPath " Should have the expected build project path"
2453+
2454+ match thirdItem.Kind with
2455+ | InspectSln.MSBuildFormat items -> Expect.isEmpty items " we don't currently store anything here"
2456+ | unexpected -> failtestf " Expected a project, but got %A " unexpected
2457+
24562458/// A test that we can load a solution that contains projects inside solution folders, and get the expected structure
24572459let sample16SolutionFoldersSlnTest toolsPath loaderType workspaceFactory =
24582460
0 commit comments