Esempio n. 1
0
        public void 使用UserName作為群組依據Test()
        {
            var expected =
                new Dictionary <string, int>()
            {
                { "demo", 4 },
                { "joey", 3 },
                { "dino", 1 },
                { "bill", 1 },
                { "maduka", 1 }
            }.ToExpectedObject();

            var actual = new GroupByLab().使用UserName作為群組依據();

            expected.ShouldEqual(actual.ToDictionary(d => d.Key, d => d.Count()));
        }
Esempio n. 2
0
        public void GroupByUserNameTest()
        {
            var expected =
                new Dictionary <string, int>()
            {
                { "Zoe", 4 },
                { "Demo", 3 },
                { "Stephen", 1 },
                { "Bill", 1 },
                { "Kyo", 1 }
            }.ToExpectedObject();

            var actual = new GroupByLab().GroupByUserName();

            expected.ShouldEqual(actual.ToDictionary(d => d.Key, d => d.Count()));
        }