@@ -63,23 +63,41 @@ internal void AssertManifest(StaticWebAssetsManifest expected, StaticWebAssetsMa
63
63
}
64
64
65
65
var manifestEndpoints = manifest . Endpoints
66
- . OrderBy ( a => a . AssetFile )
66
+ . OrderBy ( a => a . Route )
67
+ . ThenBy ( a => a . AssetFile )
67
68
. GroupBy ( a => GetEndpointGroup ( a ) )
68
69
. ToDictionary ( a => a . Key , a => a . ToArray ( ) ) ;
69
70
71
+ SortEndpointProperties ( manifestEndpoints ) ;
72
+
70
73
var expectedEndpoints = expected . Endpoints
71
74
. OrderBy ( a => a . Route )
72
75
. ThenBy ( a => a . AssetFile )
73
76
. GroupBy ( a => GetEndpointGroup ( a ) )
74
77
. ToDictionary ( a => a . Key , a => a . ToArray ( ) ) ;
75
78
79
+ SortEndpointProperties ( expectedEndpoints ) ;
80
+
76
81
foreach ( var ( group , manifestEndpointsGroup ) in manifestEndpoints )
77
82
{
78
83
var expectedEndpointsGroup = expectedEndpoints [ group ] ;
79
84
CompareEndpointGroup ( group , manifestEndpointsGroup , expectedEndpointsGroup ) ;
80
85
}
81
86
}
82
87
88
+ private static void SortEndpointProperties ( Dictionary < string , StaticWebAssetEndpoint [ ] > endpoints )
89
+ {
90
+ foreach ( var endpointGroup in endpoints . Values )
91
+ {
92
+ foreach ( var endpoint in endpointGroup )
93
+ {
94
+ Array . Sort ( endpoint . Selectors , ( a , b ) => ( a . Name , a . Value ) . CompareTo ( ( b . Name , b . Value ) ) ) ;
95
+ Array . Sort ( endpoint . ResponseHeaders , ( a , b ) => ( a . Name , a . Value ) . CompareTo ( ( b . Name , b . Value ) ) ) ;
96
+ Array . Sort ( endpoint . EndpointProperties , ( a , b ) => ( a . Name , a . Value ) . CompareTo ( ( b . Name , b . Value ) ) ) ;
97
+ }
98
+ }
99
+ }
100
+
83
101
protected virtual void CompareAssetGroup ( string group , StaticWebAsset [ ] manifestAssets , StaticWebAsset [ ] expectedAssets )
84
102
{
85
103
var comparisonMode = CompareAssetCounts ( group , manifestAssets , expectedAssets ) ;
0 commit comments