Hello. I'm currently using Subsonic 3.03 Active Record repository.
I have setup a Test connection string to utilise the dummy internal storage.
[TestInitialize]
public void TestInitialize()
{
List<ServiceJob> jobs = new List<ServiceJob>()
{
new ServiceJob() { ServiceJobID = 1 },
new ServiceJob() { ServiceJobID = 2 }
};
ServiceJob.Setup(jobs);
}
[TestMethod]
public void TestMethod()
{
ServiceJob job = ServiceJob.SingleOrDefault(s => s.ServiceJobID == 2);
Assert.AreEqual(2, job.ServiceJobID);
}
I'm expecting this unit-test to pass, but it pulls out the first service job and fails. I've also experienced problems using other sugar methods such as .Find().
It works fine when using the IQueryable interface such as ServiceJob.All.Where(s => s.ServiceJobID == 2) but don't fancy stripping out the sugar for testing purposes!
Great product by the way, really impressed so far.