Problem Could you give any suggestion on the following unit tests? How to make it more readable, maintainable and trustworthy. […]
Tag: moq
Is this UnitTest for updating an object in data-access layer sensible?
Problem I’m still trying to learn how to write good tests (and write testable code). This is the function I […]
Same setup for many properties in Moq
Problem I’m trying to use Moq to mock a rather large set of interfaces in an object. I’m trying to […]
REST Web Api unit test endpoint validity with NUnit and Moq
Problem I am unit testing that the URL that I give to my IRestClient is valid. This client talks to […]
Mocking IElasticClient in unit tests
Problem I’m trying to unit test how my class responds to a NEST 1.7 IElasticClient‘s return values, using NUnit 2.6.4 […]
Mocking the class under test with private method calls
Problem Consider the scenario below. It covers multiple methods of my unit under test. public class OriginalSample { public bool […]
Generate pieces of an SQL query [closed]
Problem Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add […]
Unit test with Moq callback anonymous function
Problem I have the following unit test that is testing predicate logic in a repository (Note: mockOpportunityRepository.Setup): [Test] public void […]
Multiple Services and Test Setup
Problem Class To Test Some methods hidden for clarity namespace RiPS.Infrastructure.UA { public class UAWorkflowManager { private readonly IContextIOAPI _api; […]
Service-Repository pattern with IoC, NPoco micro-ORM and unit tests
Problem I’m trying to build a Web API using best practices, based on a simple proof-of-concept using students. My goal […]
- 1
- 2