public void GetLookupValuesRequest_GivenAgencyTypeLookupName_ReturnsAllAgencyTypes() { var handler = new GetLookupValuesRequestHandler(new LookupTypeService(new AssemblyLocator())) { SessionProvider = SessionProvider }; Request request = new GetLookupValuesRequest { Name = "AgencyType" }; var response = handler.Handle ( request ); var lookupResponse = response as GetLookupValuesResponse; Assert.AreEqual ( 6, lookupResponse.LookupValues.Count ); }
/// <summary> /// Equalses the specified other. /// </summary> /// <param name="other">The other.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool Equals(GetLookupValuesRequest other) { if ( ReferenceEquals ( null, other ) ) { return false; } if ( ReferenceEquals ( this, other ) ) { return true; } return other.Name.Equals ( Name ) && other.DerivedDtoType == DerivedDtoType; }
/// <summary> /// Equalses the specified other. /// </summary> /// <param name="other">The other.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool Equals(GetLookupValuesRequest other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (other.Name.Equals(Name) && other.DerivedDtoType == DerivedDtoType); }
public void GetLookupValuesRequest_GivenAnUnknownLookupName_ThrowsException() { var handler = new GetLookupValuesRequestHandler(new LookupTypeService(new AssemblyLocator())) { SessionProvider = SessionProvider }; Request request = new GetLookupValuesRequest { Name = "foo" }; handler.Handle ( request ); }