public void ShouldThrowIfUnknownVacancyType() { // Arrange. var siteMapVacancy = new SiteMapVacancy { VacancyId = 1, VacancyType = VacancyType.Unknown }; // Act. Action action = () => siteMapVacancy.ToUrl(); // Assert. action.ShouldThrow <ArgumentException>(); }
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); }