public void DefaultHashTest() { var serializer = new CacheMemberSerializer(); var search = new ListingSearch(); var hash = serializer.Get(search); Assert.Equal("######", hash); }
public void CorrectlyParsesNullableEnums() { var serializer = new CacheMemberSerializer(); var search = new SomeSearchNullable { PropertyType = PropertyType.Apartment, Bedrooms = 3, Bathrooms = 2 }; var key = serializer.Get(search); Assert.Equal("232", key); }
public void CorrectlyDelimitsMixedTypes() { //should be 1-Portland-2-OR-5 var serializer = new CacheMemberSerializer(); var search = new SomeSearch { PropertyType = PropertyType.Apartment, City = "Portland", State = "OR", Beds = 3, Baths = 2 }; var key = serializer.Get(search); Assert.Equal("2-Portland-2-OR-3", key); }
public void CacheTest() { var serializer = new CacheMemberSerializer(); var search = new ListingSearch { PropertyType = PropertyType.Any, Bedrooms = 10, Bathrooms = 1, City = "Portland", State = "OR", Zip = "97209" }; var hash = serializer.Get(search); Assert.Equal("#A1-Portland-OR-97209", hash); }