6 Answers, 1 is accepted
Thank you for contacting Telerik support center.
You can find examples about getting started with Telerik`s JustMock in our online help documentation:
· http://www.telerik.com/help/justmock/introduction.html
There is an exact link, where you can find examples about mocking entity framework objects.
· http://www.telerik.com/help/justmock/advanced-usage-entity-framework-mocking.html
Please let us know if these examples work for you or you need something else.
Another source, where you can find your answers is the Telerik`s JustMock community forum. There are some articles, you may find helpful.
I hope this information resolves your case.
Regards,Kaloyan
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

thank you for your answer.
Your examples in your online help seeems to be outdated.
Entity Framework 4.1 introduced a new technology (called DBContext) to access the database.
Your examples still use old ObjectContext methods.
Do you plan to update your examples?
Regards
Dirk
Thanks again for contacting us. I have included a sample project contaning example of faking colleciton from DbContext:
[Test]
public
void
ShouldReturnFakeCollectionWhenExpected()
{
NerdDinners nerdDinners =
new
NerdDinners();
Mock.Arrange(() => nerdDinners.Dinners).ReturnsCollection(FakeDinners());
var query = from d
in
nerdDinners.Dinners
where d.DinnerID == 1
select d;
Assert.AreEqual(1, query.Count());
Assert.AreEqual(1, query.First().DinnerID);
}
Also, shows an example of mocking the process of saving an entity.
[Test]
public
void
ShouldFakeAddingNewEntityToContext()
{
NerdDinners nerdDinners =
new
NerdDinners();
var dinner =
new
Dinner { DinnerID = 1 };
IList<Dinner> dinners =
new
List<Dinner>();
Mock.Arrange(() => nerdDinners.Dinners.Add(dinner)).DoInstead((Dinner d) => dinners.Add(d));
Mock.Arrange(() => nerdDinners.SaveChanges()).DoNothing();
nerdDinners.Dinners.Add(dinner);
nerdDinners.SaveChanges();
Assert.AreEqual(1, dinners.Count);
Assert.AreEqual(1, dinners[0].DinnerID);
}
Please check them out and let us know if you still have questions.
Kind Regards
Mehfuz
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

I opened your project in Visual Studio 2012 and updated the Telerik.JustMock reference to v2012.3.1016.3. After running the tests included in the project, ShouldFakeAddingNewEntityToContext fails, while ShouldReturnFakeCollectionWhenExpected passes.
Looking at the error, something is going on when nerdDinner.SaveChanges() is called.
Test Name: ShouldFakeAddingNewEntityToContext
Test FullName: EntityFramework_Test.EntityFrameworkTest.ShouldFakeAddingNewEntityToContext
Test Source: EntityFramework\EntityFrameworkTest.cs : line 31
Test Outcome: Failed
Test Duration: 0:00:00.0436006
Result Message:
Test method EntityFramework_Test.EntityFrameworkTest.ShouldFakeAddingNewEntityToContext threw exception:
System.IO.FileLoadException: Could not load file or assembly 'Telerik.JustMock_9acc98380f6e4eccaed32b689b25f750, Version=2012.3.1016.3, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
Result StackTrace:
at System.Data.Entity.DbContext.SaveChanges()
at EntityFramework_Test.EntityFrameworkTest.ShouldFakeAddingNewEntityToContext() in EntityFramework\EntityFrameworkTest.cs:line 42
I have tested this in Visual Studio 2010 with the updated Telerik.JustMock reference, and all tests pass.
Any thoughts or ideas would be appreciated. Thanks in advance.

Regards,
Neil
Thank you for reporting this issue.
We reproduced the matter you are experiencing on our side and it seems that it`s due to a known bug in the Q3 release of JustMock. However, this issue has been already fixed and a release of the SP1 is coming this week.
In the new version, you will also find a lot of other bug fixes and support for NCover v4.0 workstation, dotTrace and other profiler using tools.
I hope this information helps.
Kind regards,
Kaloyan
the Telerik team