public void GetNewsGroupsWithFilter() { using (var client = new Rfc977NntpClient()) { client.Connect(Server); var groupCount = 0; foreach (var h in client.RetrieveNewsgroups()) { if (h.GroupName.StartsWith("comp.sys.mac")) { groupCount++; } } Assert.Greater(groupCount, 10); Assert.Less(groupCount, 200); } }
public void GetNewsGroups() { using (var client = new Rfc977NntpClient()) { client.Connect(Server); var groupCount = 0; var groups = client.RetrieveNewsgroups().ToArray(); foreach (var h in groups) { groupCount++; } Assert.Greater(groupCount, 100); File.WriteAllLines("/temp/groups.txt", groups.Select(r => r.ToString())); } }