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 );
 }
예제 #2
0
        /// <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;
        }
예제 #3
0
        /// <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 );
 }