Here is my query:
var results = Db.Customers.FindAll(Db.Customers.DomainName.Lower() == domain.ToLower()).ToList();
Here is my unit test:
public void GetCustomerByPrimaryDomainTest()
{
var fixture = new Fixture();
var customers = fixture.CreateMany(5).ToList();
var expectedCustomer = customers[2];
var expectedCustomerLikeness = new Likeness<Customer, Customer>(expectedCustomer);
foreach (var customer in customers)
{
InMemoryDatabase.Customers.Insert(customer);
}
var actualCustomer = DataAccess.GetCustomerByPrimaryDomain(expectedCustomer.DomainName);
expectedCustomerLikeness.ShouldEqual(actualCustomer);
}
This succeeds against an actual database, but not using the InMemoryAdapter. If I remove the .Lower and .ToLower clause, the test works as expected.
re: https://groups.google.com/forum/#!topic/simpledata/FGKUvacaOJ0
Here is my query: var results = Db.Customers.FindAll(Db.Customers.DomainName.Lower() == domain.ToLower()).ToList();
Here is my unit test: public void GetCustomerByPrimaryDomainTest() { var fixture = new Fixture(); var customers = fixture.CreateMany(5).ToList();
var expectedCustomer = customers[2];
var expectedCustomerLikeness = new Likeness<Customer, Customer>(expectedCustomer);
foreach (var customer in customers)
{
InMemoryDatabase.Customers.Insert(customer);
}
}
This succeeds against an actual database, but not using the InMemoryAdapter. If I remove the .Lower and .ToLower clause, the test works as expected.