23 references to Enumerable
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (23)
Extensions\EnumerableExtensionTests.cs (23)
23var elements = Enumerable(1, 2, 3);
34var elements = Enumerable(1, 2, 3);
35Assert.True(Enumerable(1, 2, 3, 4).SequenceEqual(elements.Concat(4)));
40=> Assert.True(Enumerable(1, 2, 3, 4).SetEquals(Enumerable(4, 2, 3, 1)));
45Assert.True(Enumerable<int>().IsEmpty());
46Assert.False(Enumerable(0).IsEmpty());
52Assert.True(Enumerable<bool>().All());
53Assert.True(Enumerable(true).All());
54Assert.True(Enumerable(true, true).All());
56Assert.False(Enumerable(false).All());
57Assert.False(Enumerable(false, false).All());
58Assert.False(Enumerable(true, false).All());
59Assert.False(Enumerable(false, true).All());
65Assert.Equal(string.Empty, Enumerable<string>().Join(", "));
66Assert.Equal("a", Enumerable("a").Join(", "));
67Assert.Equal("a, b", Enumerable("a", "b").Join(", "));
68Assert.Equal("a, b, c", Enumerable("a", "b", "c").Join(", "));
74var sequence = Enumerable(Enumerable("a", "b"), Enumerable("c", "d"), Enumerable("e", "f"));
75Assert.True(sequence.Flatten().SequenceEqual(Enumerable("a", "b", "c", "d", "e", "f")));