JustMock is a mocking framework for unit testing .NET code. The product is developed by Telerik.
Questions tagged [justmock]
104 questions
1
vote
1 answer
JustMock with BLL
I am using JustMock and I am having difficulty having JustMock work with Entity Framework and mocking the database activity - specifically a fake insert
I want to do a fake insert and then return the fake inserted entity. I want to test that the…

Nick
- 234
- 2
- 11
1
vote
2 answers
JustMock and nCrunch
I am getting the following error message:
The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?)
I added Just Mock to my testing project and I followed the configuration instructions at…

Jonathan
- 1,725
- 3
- 19
- 45
1
vote
2 answers
How to test that a base constructor receives right arguments?
I'm creating a methodology to write Unit Tests in my company. We are focused on testing one thing each time but in the case of checking that a base constructor receives the right parameters I'm not finding anything else rather than testing the base…

Ignacio Soler Garcia
- 21,122
- 31
- 128
- 207
1
vote
1 answer
How to Mock Asynchronous Methods in JustMock?
I am new in Mocking. I am trying to mock my dbContext using JustMock. I am using Entity Framework 6. In Entity Framework 6 some features are asynchronous. I am successfully mock synchronous methods and my test is successfully pass. But I am stuck in…

Hasanuzzaman
- 1,822
- 5
- 36
- 54
1
vote
2 answers
Telerik JustMock doesn't call expected arranged method
I have a simple silverlight unit test which doesn't work as expected:
DataContext context = Mock.Create(Constructor.Mocked);
List resources = new List();
Resource resource = new Resource
{
…

tomsky
- 535
- 4
- 11
- 28
1
vote
1 answer
"This version of JustMock has expired!" after purchasing a license
I recently purchased a license for Telerik JustMock. The Telerik Control Panel shows JustMock under my list of Purchased products. When I attempt to run my tests in Visual Studio's Test Explorer with the JustMock Visual Studio extension enabled I…

Micah Zoltu
- 6,764
- 5
- 44
- 72
1
vote
1 answer
How do I use JustMock to test interface event delegates
I'm new to TDD and unit testing and I have JustMock commercial version and a week to learn how to use it. Below are an interface, a class and a test method which passes. I had to add the Class1 faceDoesSomething to get it to compile and I'd like to…

user2506873
- 11
- 2
1
vote
1 answer
JustMock how to ignore a method call made inside the method under test
I am using JustMock to aid in unit test writing and have come to something that I thought would be fairly simple but can't find the answer to. I can't post any of the code but I'll try to explain best I can. I came up with an example to show what…

Josh
- 730
- 7
- 14
1
vote
1 answer
Nested private methods unit testing
How do i write a just mocked unit test for this scenario?
Private Method1
{
//calls private method - Method2
}
So that when i mock Method1, i need to again mock internally Method2.
I use form's private accessor to create a unit test, for…

Sharpeye500
- 8,775
- 25
- 95
- 143
0
votes
0 answers
Can you mock asynchronous calls with JustMock Lite?
Can you mock asynchronous calls with the nuget JustMock Lite (the free version) from Telerick?
We tried to mock the result of an asynchronous call that returned Task but we get an error that specifies that we need to use the payed version.…

Tavi
- 56
- 5
0
votes
1 answer
JustMock Arranging a method that returns an object whose value needs to be propagated into the SUT
I feel like I have to be missing something that is obvious, or I am overcomplication what I am doing. I am attempting to test a method that contains several other methods. One method is passed an object to write data to a database, in which the ID…

95swappedsi
- 1
- 2
0
votes
1 answer
Issues with JustMock and Large Test Runs
Ok so I have an issue with JustMock that I am hoping that someone here can help me with.
I have a class with several test methods(something like 80). Each of these methods when run independently will pass with flying colors. However I have some…

Chris
- 21
- 7
0
votes
1 answer
JustMock Will ReturnsMany returns in sequence
I am arranging call for a method in a unit test like below
container.Arrange(p=> p.doSomething(Arg.AnyString, Arg.AnyString)).ReturnsMany(1, 2);
Is 1 and 2 will be returned in sequence always or InSequence() chain is required?
Will ReturnsMany…

user1853803
- 649
- 3
- 8
- 27
0
votes
1 answer
First Unit Tests! ASP.NET MVC with Repositories causing errors
I am very new to Unit Testing, so I am starting on my first set of tests today. I am using the Library JustMock from Telerik. Though any unit testing information is good. I am having a bit of trouble with an interface service that passes through my…

Ciel
- 17,312
- 21
- 104
- 199
0
votes
0 answers
JustMock Entity Framework Update Record
I've read through the examples on JustMock (we have the paid version FYI) but am having difficulty in regards to updating a record (not adding).
I have a ILogRepo of
public interface ILogRepo
{
DbSet LogEntries { get; }
…

gilliduck
- 2,762
- 2
- 16
- 32