A mocking framework, used in unit tests for injecting "fake" implementations of interfaces as dependencies of the system under test. Use this tag for code reviews of unit testing methods that use this specific mocking framework.

learn more… | top users | synonyms

3
votes
1answer
93 views

Unit tests using C#, Moq, AutoFixture, FluentAssertions

Could you give any suggestion on the following unit tests? How to make it more readable, maintainable and trustworthy. If it is not a problem - post some code with the suggestions. ...
2
votes
1answer
34 views

Multiple Services and Test Setup

Class To Test Some methods hidden for clarity ...
0
votes
2answers
98 views

Using MOQ In Unit Testing

I am fairly new to writing unit tests, and I was wondering if this approach I have taken is on the right track? Given the following interfaces/classes: ...
4
votes
2answers
2k views

REST Web Api unit test endpoint validity with NUnit and Moq

I am unit testing that the url that I give to my IRestClient is valid. This client talks to a third party Web Api. I am new to unit testing so please bear with me. ...
1
vote
1answer
168 views

Verify collection as a method parameter

How can I verify that ohterClassMock.MethodToTest() was called with contracts? That it was called with ...
0
votes
1answer
135 views
11
votes
3answers
871 views

Which Unit Test is correct? They both test the same thing in different ways

Below both Unit Tests pass and they both test the same thing. Which is the production code uses the right error codes. The short question is which test is correctly Unit Testing expected behaviour ...
5
votes
2answers
289 views

Is this UnitTest for updating an object in data-access layer sensible?

I'm still trying to learn how to write good tests (and write testable code). This is the function I want to verify, ...
0
votes
1answer
2k views

Mocking the class under test with private method calls

Consider the scenario below. It covers multiple methods of my unit under test. ...