Using VS 2012 update 4 w/ the latest version of JustMock (verified in the Telerik Control Panel).
I have the following lines in my test:
jobLogEntries = new List<job_log>();
jobLogEntries.Add(new job_log
{
job_log_ky = 27,
});
Mock.Arrange(() => this.Entities.job_log).IgnoreInstance().ReturnsCollection(jobLogEntries);
I have the following lines inside the code being tested:
jobLog = new job_log
{
job_schedule_ky = this.JobScheduleRecord.job_schedule_ky,
job_name = this.JobScheduleRecord.job_name,
start_dt_tm = DateTime.Now,
};
ctx.job_log.Add(jobLog);
During debugging I can see the job_log record that was added into the collection by the test, however the jobLog entity is not being added to the collection, causing the overall test to fail.
I have the following lines in my test:
jobLogEntries = new List<job_log>();
jobLogEntries.Add(new job_log
{
job_log_ky = 27,
});
Mock.Arrange(() => this.Entities.job_log).IgnoreInstance().ReturnsCollection(jobLogEntries);
I have the following lines inside the code being tested:
jobLog = new job_log
{
job_schedule_ky = this.JobScheduleRecord.job_schedule_ky,
job_name = this.JobScheduleRecord.job_name,
start_dt_tm = DateTime.Now,
};
ctx.job_log.Add(jobLog);
During debugging I can see the job_log record that was added into the collection by the test, however the jobLog entity is not being added to the collection, causing the overall test to fail.