Ejemplo n.º 1
0
        public void BuildTitleIsYearWhenYearIsAboveZero()
        {
            var title = new HomepageTitleFactory().BuildTitle(new HomepageParameters
            {
                Year = 1,
                Month = 0
            });

            Assert.That(title, Is.EqualTo("1"));
        }
Ejemplo n.º 2
0
        public void BuildTitleIsMonthAndYearWhenBothAboveZero()
        {
            var title = new HomepageTitleFactory().BuildTitle(new HomepageParameters
            {
                Year = 1,
                Month = 1
            });

            Assert.That(title, Is.EqualTo("January 1"));
        }
Ejemplo n.º 3
0
        public void BuildTitleIsEmptyWhenMonthAndYearAreZero()
        {
            var title = new HomepageTitleFactory().BuildTitle(new HomepageParameters
                                                                  {
                                                                      Year = 0,
                                                                      Month = 0
                                                                  });

            Assert.That(title, Is.EqualTo(string.Empty));
        }
Ejemplo n.º 4
0
        public void BuildTitleIsMonthAndYearAndTagWhenBothAboveZeroAndTagIsATag()
        {
            var title = new HomepageTitleFactory().BuildTitle(new HomepageParameters
            {
                Year = 1,
                Month = 1,
                Tag = "ATag"
            });

            Assert.That(title, Is.EqualTo("January 1 - tagged ATag"));
        }
Ejemplo n.º 5
0
        public void BuildTitleIsMonthAndYearAndCategoryWhenBothAboveZeroAndCategoryIsACategory()
        {
            var title = new HomepageTitleFactory().BuildTitle(new HomepageParameters
            {
                Year = 1,
                Month = 1,
                Category = "ACategory"
            });

            Assert.That(title, Is.EqualTo("January 1 - ACategory"));
        }