public void UniqueProperty_IfDeparturesUniqueListCountMoreTnanOne_ThrowException() { unsortedList.Add(new TravelCard { Departure = "Лондон", Arrival = "Кельн" }); var individualPropertyList = _build.IndividualPropertyList("Departure"); Assert.That(() => _build.UniqueProperty(listOfStrings, "Departure"), Throws.Exception); }
public void UniqueProperty_IfInputPropertyNameNotEqualDepartureOrArrival_ThrowException(string propertyName) { var build = new ChainBuilder(new List <TravelCard>()); listOfStrings.Add("a"); Assert.That(() => build.UniqueProperty(listOfStrings, propertyName), Throws.Exception); }
public void UniqueProperty_IfInputListOfStringsIsEmpty_ThrowArgumentNullException() { var build = new ChainBuilder(new List <TravelCard>()); Assert.That(() => build.UniqueProperty(emptyList, "propertyName"), Throws.ArgumentNullException); }