Exemplo n.º 1
0
        public void ShouldThrowIfUnknownVacancyType()
        {
            // Arrange.
            var siteMapVacancy = new SiteMapVacancy
            {
                VacancyId   = 1,
                VacancyType = VacancyType.Unknown
            };

            // Act.
            Action action = () => siteMapVacancy.ToUrl();

            // Assert.
            action.ShouldThrow <ArgumentException>();
        }
Exemplo n.º 2
0
        public void ShouldConvertToUrl(VacancyType vacancyType, int vacancyId, string expectedUrl)
        {
            // Arrange.
            var siteMapVacancy = new SiteMapVacancy
            {
                VacancyId   = vacancyId,
                VacancyType = vacancyType
            };

            // Act.
            var actualUrl = siteMapVacancy.ToUrl();

            // Assert.
            actualUrl.Should().Be(expectedUrl);
        }