Skip to content

Commit 7eaf822

Browse files
committed
C#: Improve FeedManager unit test explanations.
1 parent f8c2820 commit 7eaf822

1 file changed

Lines changed: 37 additions & 25 deletions

File tree

‎csharp/extractor/Semmle.Extraction.Tests/FeedManager.cs‎

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ private static FeedManager MakeFeedManager()
8686
}
8787

8888
/// <summary>
89-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
90-
/// explicit feeds.
89+
/// Verify that `FeedManager` correctly computes the explicit feeds using feeds discovered in nuget.config files and
90+
/// private registries.
91+
/// See the initialization of `DotNetStub` and `DependabotProxyStub` in `MakeFeedManager` for the feeds configured
92+
/// to be returned and classified as explicit feeds.
9193
/// </summary>
9294
[Fact]
9395
public void TestExplicitFeeds()
@@ -107,8 +109,9 @@ public void TestExplicitFeeds()
107109
}
108110

109111
/// <summary>
110-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
111-
/// inherited feeds.
112+
/// Verify that `FeedManager` correctly computes the inherited feeds using feeds discovered from the environment.
113+
/// See the initialization of `DotNetStub` in `MakeFeedManager` for the feeds configured
114+
/// to be returned and classified as inherited feeds.
112115
/// </summary>
113116
[Fact]
114117
public void TestInheritedFeeds()
@@ -127,8 +130,10 @@ public void TestInheritedFeeds()
127130
}
128131

129132
/// <summary>
130-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
131-
/// all feeds.
133+
/// Verify that `FeedManager` correctly computes all feeds using feeds discovered in nuget.config files, private registries,
134+
/// and the environment.
135+
/// See the initialization of `DotNetStub` and `DependabotProxyStub` in `MakeFeedManager` for the feeds configured
136+
/// to be returned and included in all feeds.
132137
/// </summary>
133138
[Fact]
134139
public void TestAllFeeds()
@@ -150,8 +155,10 @@ public void TestAllFeeds()
150155
}
151156

152157
/// <summary>
153-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
154-
/// reachable feeds.
158+
/// Verify that `FeedManager` correctly computes the reachable feeds using feeds discovered in
159+
/// nuget.config files, private registries, and the environment.
160+
/// See the initialization of `FeedManagerIOStub` in `MakeFeedManager` for the feeds configured as unreachable
161+
/// and therefore filtered out of the reachable feeds.
155162
/// </summary>
156163
[Fact]
157164
public void TestReachableFeeds()
@@ -171,8 +178,10 @@ public void TestReachableFeeds()
171178
}
172179

173180
/// <summary>
174-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
175-
/// reachable explicit feeds.
181+
/// Verify that `FeedManager` correctly computes the reachable explicit feeds using feeds discovered in
182+
/// nuget.config files and private registries.
183+
/// See the initialization of `FeedManagerIOStub` in `MakeFeedManager` for the feeds configured as unreachable
184+
/// and therefore filtered out of the reachable explicit feeds.
176185
/// </summary>
177186
[Fact]
178187
public void TestReachableExplicitFeeds()
@@ -191,8 +200,10 @@ public void TestReachableExplicitFeeds()
191200
}
192201

193202
/// <summary>
194-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
195-
/// reachable fallback feeds.
203+
/// Verify that `FeedManager` correctly computes the reachable fallback feeds using feeds discovered in
204+
/// nuget.config files and the default NuGet.org feed.
205+
/// See the initialization of `FeedManagerIOStub` in `MakeFeedManager` for the feeds configured as unreachable
206+
/// and therefore filtered out of the reachable fallback feeds.
196207
/// </summary>
197208
[Fact]
198209
public void TestReachableFallbackFeeds()
@@ -212,8 +223,10 @@ public void TestReachableFallbackFeeds()
212223
}
213224

214225
/// <summary>
215-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
216-
/// feeds to use for a given file.
226+
/// Verify that `FeedManager` correctly computes the feeds to use for a given packages.config file from feeds discovered
227+
/// in private registries and the environment.
228+
/// See the initialization of `DotNetStub` in `MakeFeedManager` for the feeds configured
229+
/// to be returned and selected for use.
217230
/// </summary>
218231
[Fact]
219232
public void TestFeedsToUse()
@@ -232,8 +245,8 @@ public void TestFeedsToUse()
232245
}
233246

234247
/// <summary>
235-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
236-
/// default feeds and reachable default feeds when no private registries are configured.
248+
/// Verify that `FeedManager` correctly computes the default feeds and reachable default feeds
249+
/// when no private registries are configured.
237250
/// </summary>
238251
[Fact]
239252
public void TestDefaultFeedsNugetOrg()
@@ -255,9 +268,9 @@ public void TestDefaultFeedsNugetOrg()
255268
}
256269

257270
/// <summary>
258-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
259-
/// default feeds, reachable default feeds, and fallback feeds when private registries
260-
/// are configured and some of them replace the default feeds.
271+
/// Verify that `FeedManager` correctly computes the default feeds and reachable default feeds
272+
/// when private registries are configured to replace the default feeds.
273+
/// See the initialization of `DependabotProxyStubWithBaseUrls` for the feeds configured to replace the default feeds.
261274
/// </summary>
262275
[Fact]
263276
public void TestDefaultFeedsPrivateRegistries()
@@ -290,9 +303,8 @@ public void TestDefaultFeedsPrivateRegistries()
290303
}
291304

292305
/// <summary>
293-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
294-
/// all feeds when https://api.nuget.org/v3/index.json is not replaced by any private registries because
295-
/// none of them are configured to replace the base feeds.
306+
/// Verify that `FeedManager` correctly computes all feeds when https://api.nuget.org/v3/index.json is not replaced
307+
/// by a private registry because no private registry is configured to replace the base feed.
296308
/// </summary>
297309
[Fact]
298310
public void TestNugetOrgNotReplaced()
@@ -323,9 +335,9 @@ public void TestNugetOrgNotReplaced()
323335
}
324336

325337
/// <summary>
326-
/// The purpose of this test is to verify that the FeedManager correctly computes the set of
327-
/// all feeds when https://api.nuget.org/v3/index.json and related NuGet.org URLs are replaced by private
328-
/// registries configured to replace the base feeds.
338+
/// Verify that `FeedManager` correctly computes the explicit and all feeds when https://api.nuget.org/v3/index.json and
339+
/// related NuGet.org URLs are replaced by private registries configured to replace the base feeds.
340+
/// See the initialization of `DependabotProxyStubWithBaseUrls` for the feeds configured as default replacements.
329341
/// </summary>
330342
[Fact]
331343
public void TestNugetOrgReplacement()

0 commit comments

Comments
 (0)