Gang Of Coders
Home
About Us
Contact Us
All Mocking Solutions on Gang of Coders
Total of 222 Mocking Solutions
mock nested method calls using mockito
Java
Methods
Junit
Mocking
Mockito
Should you only mock types you own?
Mocking
Calling original method with Moq
C#
Mocking
Moq
Using Mockito to stub and execute methods for testing
Java
Junit
Mocking
Mockito
Python Mock Multiple Calls with Different Results
Python
Mocking
MOCKITO: What is it and how is it different from Junit
Unit Testing
Testing
Junit
Mocking
Mockito
How override Provider in Angular 5 for only one test?
Testing
Mocking
Angular5
Angular Providers
Testbed
jest typescript property mock does not exist on type
Typescript
Jestjs
Mocking
Mocking virtual readonly properties with moq
Unit Testing
Tdd
Mocking
Moq
Moq - How to verify that a property value is set via the setter
C#
.Net
Mocking
Tdd
Moq
Javascript: Mocking Constructor using Sinon
Javascript
Unit Testing
Constructor
Mocking
Sinon
How to pass in a mocked HttpClient in a .NET test?
C#
.Net
Mocking
Dotnet Httpclient
Microsoft Fakes
Verify object attribute value with mockito
Java
Mocking
Mockito
Mocking in Swift
Unit Testing
Mocking
Swift
How to mock an activatedRoute parent Route in angular2 for testing purposes?
Unit Testing
Angular
Typescript
Mocking
Jasmine
How to mock http.Client Do method
Unit Testing
Testing
Go
Mocking
PowerMock testing - set static field of class
Junit
Static
Mocking
Powermock
PHPUnit: expects method meaning
Php
Unit Testing
Tdd
Mocking
Phpunit
Python mock patch a function called by another function
Python
Unit Testing
Testing
Mocking
Patch
@Patch decorator is not compatible with pytest fixture
Python
Mocking
Pytest
Fixtures
How can I validate exits and aborts in RSpec?
Ruby
Rspec
Mocking
Why is it so bad to mock classes?
Unit Testing
Testing
Mocking
Are fakes better than Mocks?
C#
Unit Testing
Mocking
Fakeiteasy
Mocking a class vs. mocking its interface
Java
Unit Testing
Junit
Mocking
How to mock a function defined in a module of a package?
Python
Mocking
Forming Mockito "grammars"
Java
Unit Testing
Junit
Mocking
Mockito
How to verify mocked method not called with any combination of parameters using Mockito
Java
Unit Testing
Mocking
Mockito
RSpec allow/expect vs just expect/and_return
Ruby
Testing
Rspec
Mocking
Rspec3
Mockito: using a method in "thenReturn" to return a mock doesn't work
Java
Unit Testing
Mocking
Mockito
Use Mockito to verify that nothing is called after a method
Java
Unit Testing
Mocking
Mockito
How to mock Controller.User using moq
C#
asp.net Mvc
Unit Testing
Mocking
Moq
Mocking out methods on any instance of a python class
Python
Testing
Mocking
Moq: Setup a mocked method to fail on the first call, succeed on the second
C#
Unit Testing
Mocking
Nunit
Moq
How do I mock a django signal handler?
Python
Django
Mocking
Signals
Django Signals
How to monkeypatch python's datetime.datetime.now with py.test?
Python
Datetime
Mocking
Pytest
Is it possible to create a mock object that implements multiple interfaces with EasyMock?
Java
Unit Testing
Mocking
Rhino Mocks
Easymock
Moq - verify that no methods were called
Unit Testing
Mocking
Moq
Mock objects - Setup method - Test Driven Development
Unit Testing
Tdd
Mocking
Moq
Mock in PHPUnit - multiple configuration of the same method with different arguments
Php
Mocking
Phpunit
In PHPUnit, how do I indicate different with() on successive calls to a mocked method?
Php
Mocking
Phpunit
How to mock python's datetime.now() in a class method for unit testing?
Python
Django
Unit Testing
Testing
Mocking
Why python mock patch doesn't work?
Python
Unit Testing
Mocking
Nose
Mocking a singleton with mockito
Java
Unit Testing
Junit
Mocking
Mockito
Python, mock: raise exception
Python
Unit Testing
Exception
Mocking
What's the difference between a mock & stub?
Testing
Mocking
Stub
Python mock multiple return values
Python
Unit Testing
Mocking
Python Mock
How to mock void methods with Mockito
Java
Unit Testing
Mocking
Mockito
Void
How do I mock an open used in a with statement (using the Mock framework in Python)?
Python
Mocking
With Statement
throw checked Exceptions from mocks with Mockito
Java
Mocking
Mockito
How to tell a Mockito mock object to return something different the next time it is called?
Java
Unit Testing
Junit
Mocking
Mockito
Asserting successive calls to a mock method
Python
Mocking
Using Mockito to test abstract classes
Java
Unit Testing
Mocking
Abstract Class
Mockito
Mocking Extension Methods with Moq
C#
Unit Testing
Mocking
Extension Methods
Moq
Mocking python function based on input arguments
Python
Unit Testing
Mocking
Mockito
Using Mockito's generic "any()" method
Java
Unit Testing
Mocking
Mockito
Trying to mock datetime.date.today(), but not working
Python
Testing
Datetime
Mocking
Unfinished Stubbing Detected in Mockito
Java
Mocking
Mockito
What's the difference between faking, mocking, and stubbing?
Unit Testing
Mocking
Language Agnostic
Terminology
Definition
Mock HttpContext.Current in Test Init Method
C#
Unit Testing
Mocking
Httpcontext
What is the purpose of mock objects?
Unit Testing
Mocking
How can I "sleep" a Dart program
Unit Testing
Mocking
Dart
Mock vs MagicMock
Python
Mocking
How can I mock the JavaScript window object using Jest?
Javascript
Mocking
Jestjs
How to mock the Request on Controller in ASP.Net MVC?
asp.net Mvc
Unit Testing
Mocking
Rhino Mocks
Moq
How to change mock implementation on a per single test basis [Jestjs]
Javascript
Unit Testing
Mocking
Jestjs
How to mock an import
Python
Mocking
Python Import
Jest: Better way to disable console inside unit tests
Javascript
Unit Testing
Mocking
Jestjs
Mock functions in Go
Unit Testing
Mocking
Go
When should I mock?
Unit Testing
Language Agnostic
Mocking
How to properly match varargs in Mockito
Java
Mocking
Variadic Functions
Mockito
How do you mock out the file system in C# for unit testing?
C#
Unit Testing
Mocking
How to unit test a Node.js module that requires other modules and how to mock the global require function?
Javascript
node.js
Mocking
Random data in Unit Tests?
Unit Testing
Tdd
Mocking
What is the difference between mocking and spying when using Mockito?
Java
Testing
Mocking
Mockito
Assert a function/method was not called using Mock
Python
Unit Testing
Mocking
Python Mock
Using Moq to determine if a method is called
C#
.Net
Unit Testing
Mocking
Moq
Mocking vs. Spying in mocking frameworks
Unit Testing
Mocking
Tdd
Mocking a class: Mock() or patch()?
Python
Unit Testing
Mocking
How can I get PHPUnit MockObjects to return different values based on a parameter?
Php
Unit Testing
Mocking
Phpunit
Moq mock method with out specifying input parameter
C#
Mocking
Moq
Mocking member variables of a class using Mockito
Java
Mocking
Mockito
Mocking a function to raise an Exception to test an except block
Python
Unit Testing
Python 2.7
Mocking
Python Mock
How do I mock a service that returns promise in AngularJS Jasmine unit test?
Javascript
Angularjs
Unit Testing
Mocking
Jasmine
How to mock location on device?
Android
Gps
Location
Mocking
ASP.NET WebApi unit testing with Request.CreateResponse
C#
Unit Testing
asp.net Web-Api
Mocking
Httpresponse
What are the differences between mocks and stubs on Rhino Mocks?
Mocking
Rhino Mocks
Mockito - @Spy vs @Mock
Java
Unit Testing
Mocking
Mockito
Spy
What is Mocking?
Unit Testing
Mocking
phpunit mock method multiple calls with different arguments
Php
Mocking
Phpunit
How to spyOn a value property (rather than a method) with Jasmine
Javascript
Unit Testing
Mocking
Jasmine
Difference between @Mock and @InjectMocks
Java
Unit Testing
Mocking
Mockito
How do I verify a method was called exactly once with Moq?
.Net
Mocking
Moq
How do Mockito matchers work?
Java
Mocking
Mockito
Comparison between Mockito vs JMockit - why is Mockito voted better than JMockit?
Java
Unit Testing
Mocking
Mockito
Jmockit
How to mock localStorage in JavaScript unit tests?
Javascript
Unit Testing
Mocking
Local Storage
Sinon
How can I mock dependencies for unit testing in RequireJS?
Javascript
Unit Testing
Mocking
Requirejs
How does mockito when() invocation work?
Unit Testing
Mocking
Mockito
Using python's mock patch.object to change the return value of a method called within another method
Python
Unit Testing
Mocking
Patch
Difference between Mock / Stub / Spy in Spock test framework
Testing
Mocking
Spock
Stub
Spy
How to mock a readonly property with mock?
Python
Unit Testing
Mocking
Pytest
Injecting a mock into an AngularJS service
Javascript
Angularjs
Mocking
Jasmine
Angularjs Service
Can Mockito capture arguments of a method called multiple times?
Java
Unit Testing
Mocking
Mockito
How do I mock the HttpContext in ASP.NET MVC using Moq?
C#
asp.net Mvc
Mocking
Moq
Httpcontext
Use Mockito to mock some methods but not others
Java
Mocking
Mockito
Mocking boto3 S3 client method Python
Python
Mocking
Boto
Boto3
Botocore
Mocking time in Java 8's java.time API
Java
Datetime
Mocking
Java 8
Java Time
Mock a constructor with parameter
Java
Junit
Mocking
Mockito
Powermock
Mockito test a void method throws an exception
Java
Exception
Mocking
Mockito
How do I mock a class without an interface?
C#
Mocking
Tdd
How to make Jest wait for all asynchronous code to finish execution before expecting an assertion
Reactjs
Mocking
Jestjs
Enzyme
Can I patch a Python decorator before it wraps a function?
Python
Unit Testing
Mocking
Decorator
Monkeypatching
mock instance is null after @Mock annotation
Java
Unit Testing
Junit
Mocking
Mockito
Square retrofit server mock for testing
Android
Testing
Mocking
Retrofit
Mockwebserver
Python: Mocking a context manager
Python
Mocking
How to mock functions in the same module using Jest?
Javascript
Testing
Mocking
Jestjs
How to MOQ an Indexed property
C#
Tdd
Mocking
Moq
Returning value that was passed into a method
C#
Mocking
Moq
Typescript and Jest: Avoiding type errors on mocked functions
node.js
Reactjs
Typescript
Mocking
Jestjs
Mocking two functions with patch for a unit test
Python
Unit Testing
Testing
Mocking
Nose
How to change the behaviour of a mocked import?
Javascript
React Native
Unit Testing
Jestjs
Mocking
How should I verify a log message when testing Python code under nose?
Python
Unit Testing
Mocking
Nose
Using IoC for Unit Testing
C#
Unit Testing
Mocking
Inversion of-Control
Faking an RS232 Serial Port
Windows
Mocking
Serial Port
Hardware Interface
Virtual Serial-Port
How do I use Moq to mock an extension method?
C#
Mocking
Moq
Extension Methods
How to mock ModelState.IsValid using the Moq framework?
C#
asp.net Mvc
Unit Testing
Mocking
Moq
mockito callbacks and getting argument values
Java
Unit Testing
Mocking
Mockito
Using mock patch to mock an instance method
Python
Mocking
What is your favorite Python mocking library?
Python
Mocking
Mock attributes in Python mock?
Python
Unit Testing
Testing
Mocking
Python Mock
Mocking static methods with Mockito
Java
Unit Testing
Static
Mocking
Mockito
Is it possible to use Mockito in Kotlin?
Java
Mocking
Mockito
Kotlin
Mocking Java InputStream
Java
Mocking
mock or stub for chained call
Java
Unit Testing
Mocking
Mockito
Mocking Functions Using Python Mock
Python
Unit Testing
Mocking
What is the difference between mock.patch.object(... and mock.patch(
Python
Unit Testing
Mocking
Swagger/OpenAPI mock server
Mocking
Swagger
Swagger 2.0
Openapi
python mock - patching a method without obstructing implementation
Python
Mocking
How can I mock methods of @InjectMocks class?
Java
Unit Testing
Mocking
Mockito
Can Mockito verify an argument has certain properties/fields?
Java
Unit Testing
Mocking
Mockito
Are there any Fake File System frameworks for Java?
Java
Unit Testing
Testing
Mocking
Multiple Moq It.Is<string>() Matching Arguments
C#
Unit Testing
Mocking
Moq
Mocking Java enum to add a value to test fail case
Java
Unit Testing
Enums
Mocking
Code Coverage
moq objects Returns method, should return a null object
C#
asp.net Mvc-3
Mocking
Moq
Wcf Web-Api
SetupSequence in Moq
C#
Unit Testing
Mocking
Moq
How to test or mock "if __name__ == '__main__'" contents
Python
Unit Testing
Testing
Mocking
Python Import
How to match null passed to parameter of Class<T> with Mockito
Java
Unit Testing
Mocking
Mockito
Can I delay a stubbed method response with Mockito?
Java
Junit
Mocking
Mockito
Mocking database in node.js?
node.js
Mongodb
Unit Testing
Mocking
Database
Mocking Static Methods
C#
Unit Testing
Mocking
Moq
Unit testing a python app that uses the requests library
Python
Unit Testing
Testing
Mocking
Python Requests
Python mock Patch os.environ and return value
Python
Unit Testing
Python 3.x
Dependency Injection
Mocking
How can I mock an ES6 module import using Jest?
Javascript
node.js
Mocking
Ecmascript 6
Jestjs
Using Mockito with multiple calls to the same method with the same arguments
Java
Mocking
Mockito
Mock private method with PHPUnit
Php
Mocking
Phpunit
How to mock users and requests in django
Python
Django
Unit Testing
Mocking
How do I mock a static method that returns void with PowerMock?
Static
Mocking
Mockito
Void
Powermock
Mocking a method to throw an exception (moq), but otherwise act like the mocked object?
C#
Unit Testing
Mocking
Moq
How to mock static methods in c# using MOQ framework?
C#
Unit Testing
Mocking
Moq
How to properly use mock in python with unittest setUp
Python
Unit Testing
Mocking
mocking window.location.href in Javascript
Javascript
Mocking
Jasmine
RSpec: how to test Rails logger message expectations?
Logging
Rspec
Mocking
Stubbing
Mocking generic methods in Moq without specifying T
C#
.Net
Generics
Mocking
Moq
How to say "any_instance" "should_receive" any number of times in RSpec
Ruby on-Rails
Testing
Rspec
Mocking
mocha.js
Mock an update method returning a void with Moq
C#
.Net
Mocking
Moq
Creating a mock HttpServletRequest out of a url string?
Java
Mocking
Servlets
How can one mock/stub python module like urllib
Python
Unit Testing
Testing
Mocking
How to mock/replace getter function of object with Jest?
Javascript
Reactjs
Mocking
Sinon
Jestjs
Settings variable values in a Moq Callback() call
C#
.Net
Unit Testing
Mocking
Moq
What's the best strategy for unit-testing database-driven applications?
Database
Unit Testing
Orm
Mocking
Difference between resetAllMocks, resetModules, resetModuleRegistry, restoreAllMocks in Jest
Javascript
Unit Testing
Mocking
Jestjs
Final method mocking
Java
Unit Testing
Testing
Mocking
Mockito
Python Mock object with method called multiple times
Python
Unit Testing
Mocking
Python Mock
Proxyquire, rewire, SandboxedModule, and Sinon: pros & cons
node.js
Mocking
Sinon
Proxyquire
jquery (or pure js) simulate enter key pressed for testing
Javascript
Jquery
Testing
Mocking
Is it possible to mock out a .NET HttpWebResponse?
C#
.Net
Unit Testing
Mocking
Moq
How to assign values to properties in moq?
C#
Unit Testing
Mocking
Moq
Mockito - thenCallRealMethod() on void function
Unit Testing
Junit
Mocking
Mockito
Void
How do you mock a Sealed class?
Unit Testing
Language Agnostic
Tdd
Mocking
Mocking Asp.net-mvc Controller Context
asp.net Mvc
Unit Testing
Mocking
Moq
Rhino Mocks
Django: How to create a model dynamically just for testing
Python
Django
Unit Testing
Django Models
Mocking
How to mock the CreateResponse<T> extension method on HttpRequestMessage
C#
Unit Testing
asp.net Mvc-4
Mocking
Jasmine 2.0 async done() and angular-mocks inject() in same test it()
Javascript
Angularjs
Unit Testing
Mocking
Jasmine
EasyMock: Void Methods
Java
Unit Testing
Mocking
Void
Easymock
SetupSet() is obsolete. In place of what?
C#
.Net
Unit Testing
Mocking
Moq
Passing Moq mock-objects to constructor
C#
.Net
Mocking
Moq
Using Mockito, how do I verify a method was a called with a certain argument?
Java
Mocking
Mockito
What is the difference between Mockito.mock(SomeClass) and the @Mock annotation?
Java
Unit Testing
Junit
Mocking
Mockito
Mocking a global variable
Python
Unit Testing
Mocking
Patch
How to spy on a default exported function with Jest?
Reactjs
Unit Testing
Mocking
Jestjs
Spy
PHPUnit: how do I mock multiple method calls with multiple arguments?
Php
Mocking
Tdd
Phpunit
Mockito: How to verify a method was called only once with exact parameters ignoring calls to other methods?
Java
Unit Testing
Testing
Mocking
Mockito
What is the difference between jest.fn() and jest.spyOn() methods in jest?
Reactjs
Mocking
Jestjs
Spy
How to mock IConfiguration.GetValue
C#
.Net Core
Mocking
Nsubstitute
Mocking methods of local scope objects with Mockito
Object
Mocking
Local
Mockito
What's the best mock framework for Java?
Java
Unit Testing
Mocking
How to mock Spring WebFlux WebClient?
Spring
Rest
Unit Testing
Mocking
Reactive Programming
Where is the MOQ documentation?
C#
.Net
Testing
Mocking
Moq
Moq, strict vs loose usage
C#
.Net
Unit Testing
Mocking
Moq
How to check JSON in response body with mockMvc
Java
Spring
Junit
Mocking
Spring Test-Mvc
PowerMock + Mockito VS Mockito alone
Java
Mocking
Mockito
Powermock
How to determine if JEST is running the code or not?
Javascript
Firebase
React Native
Mocking
Jestjs
Can Mockito stub a method without regard to the argument?
Java
Unit Testing
Mocking
Mockito
Database data needed in integration tests; created by API calls or using imported data?
Unit Testing
Testing
Mocking
Integration Testing
Is Google Mock a good mocking framework?
C++
Mocking
Googlemock
How to mock a class that implements multiple interfaces
C#
Mocking
Moq
unittest.mock: asserting partial match for method argument
Python
Unit Testing
Mocking
Why use It.is<> or It.IsAny<> if I could just define a variable?
C#
Unit Testing
Testing
Mocking
Moq
The value of high level unit tests and mock objects
Unit Testing
Mocking
What is the best way to unit-test SLF4J log messages?
Unit Testing
Mocking
Mockito
Slf4j
Modify input parameter of a void function and read it afterwards
Java
Junit
Mocking
Mockito
PHPUnit Mock Objects and Static Methods
Php
Unit Testing
Mocking
Doctrine
Phpunit
How to check String in response body with mockMvc
Java
Spring
Mocking
Spring Test-Mvc
Stubbing a method that takes Class<T> as parameter with Mockito
Java
Class
Generics
Mocking
Mockito
Django testing model with ImageField
Python
Django
Testing
Mocking
patching a class yields "AttributeError: Mock object has no attribute" when accessing instance attributes
Python
Unit Testing
Attributes
Mocking
Python Unittest
How to use @InjectMocks along with @Autowired annotation in Junit
Java
Spring
Junit
Mocking
Mockito
python mocking raw input in unittests
Python
Unit Testing
Mocking
Mock.Of<Object> VS Mock<Object>()
C#
Unit Testing
Testing
Mocking
Moq
How can I mock requests and the response?
Python
Mocking
Request
Why DbContext doesn't implement IDbContext interface?
Entity Framework
Unit Testing
Testing
Mocking
Moq
Unable to mock Service class in Spring MVC Controller tests
Java
Spring
Spring Mvc
Mocking
Mockito
How do I mock the filesystem in Python unit tests?
Python
Unit Testing
Mocking
Filesystems