Inheritance: IHomeAssembler
示例#1
0
        public void Test_Initializes_EntryGroups()
        {
            var target = new HomeAssembler(
                GetEntryServiceStubForTestingEntryGroups(),
                GetUserSettingStub(),
                GetTimeServiceStub());

            var actual = target.AssembleHomeIndexViewModel(string.Empty);

            Assert.IsNotNull(actual.EntryGroups);
        }
示例#2
0
        public void Test_AssembleHomeIndexViewModel_Initializes_EntryGroups()
        {
            var target = new HomeAssembler(GetEntryServiceStubForTestingEntryGroups(), GetUserSettingStub());

            var createdOnMin = new DateTime(2011, 10, 17, 0, 0, 0, DateTimeKind.Local);
            var createdOnMax = new DateTime(2011, 10, 20, 0, 0, 0, DateTimeKind.Local);

            var actual = target.AssembleHomeIndexViewModel(createdOnMin, createdOnMax, string.Empty);

            Assert.IsNotNull(actual.EntryGroups);
        }
示例#3
0
        public void Test_Groups_Entries_Correctly()
        {
            var target = new HomeAssembler(
                GetEntryServiceStubForTestingEntryGroups(),
                GetUserSettingStub(),
                GetTimeServiceStub());

            var actual = target.AssembleHomeIndexViewModel(string.Empty);

            var firstEntryGroup = actual.EntryGroups.First();
            var secondEntryGroup = actual.EntryGroups.ElementAt(1);

            Assert.AreEqual(2, firstEntryGroup.Entries.Count());
            Assert.AreEqual(1, secondEntryGroup.Entries.Count());
        }
示例#4
0
        public void Test_AssembleHomeIndexViewModel_Groups_Entries_Correctly()
        {
            var target = new HomeAssembler(GetEntryServiceStubForTestingEntryGroups(), GetUserSettingStub());

            var createdOnMin = new DateTime(2011, 10, 17, 0, 0, 0, DateTimeKind.Local);
            var createdOnMax = new DateTime(2011, 10, 20, 0, 0, 0, DateTimeKind.Local);

            var actual = target.AssembleHomeIndexViewModel(createdOnMin, createdOnMax, string.Empty);

            var firstEntryGroup = actual.EntryGroups.First();
            var secondEntryGroup = actual.EntryGroups.ElementAt(1);

            Assert.AreEqual(2, firstEntryGroup.Entries.Count());
            Assert.AreEqual(1, secondEntryGroup.Entries.Count());
        }