コード例 #1
0
        public void GetTopTags_GetResult_NotFail_Test()
        {
            var expected = new List <Tag>()
            {
                new Tag()
            };
            bool called      = false;
            int  organizerId = 1;

            IEventDefinitionRepository eventDefinitionService = new StubIEventDefinitionRepository()
            {
                GetTopTagsInt32 = (id) =>
                {
                    called = true;
                    return(expected);
                }
            };

            var target = new TagsController(eventDefinitionService);

            IEnumerable <Tag> actual = target.GetTopTags(organizerId);

            Assert.IsTrue(called);
            Assert.AreEqual(expected.Count, actual.Count());
        }