ArchiMetrics.Analysis.Tests.LinqExtensionsTests.DistinctByMatchesByPassedPredicate C# (CSharp) 메소드

DistinctByMatchesByPassedPredicate() 개인적인 메소드

private DistinctByMatchesByPassedPredicate ( ) : void
리턴 void
        public void DistinctByMatchesByPassedPredicate()
        {
            var items = new[]
                        {
                            new TestItem { Value = 1 },
                            new TestItem { Value = 2 },
                            new TestItem { Value = 2 }
                        };

            var distinctItems = items.DistinctBy(x => x.Value);

            Assert.Equal(2, distinctItems.Count());
        }