Mocking and faking are ways to isolate code or components to ensure that unit tests run against the testable unit of code only without actually utilizing other components or dependencies of an application.
I have a method call which I want to mock with mockito. To start with I have created and injected …
java mocking mockitoI'm trying to have one of my mocked objects throw a checked Exception when a particular method is called. I'm …
java mocking mockitoI'd like to test an abstract class. Sure, I can manually write a mock that inherits from the class. Can …
java unit-testing mocking abstract-class mockitoIs it possible to mock a return value of a function called within another function I am trying to test? …
python unit-testing mocking patchI have myService that uses myOtherService, which makes a remote call, returning promise: angular.module('app.myService', ['app.myOtherService']) .factory(…
javascript angularjs unit-testing mocking jasmineI'm trying to add unit testing to an ASP.NET MVC application I have built. In my unit tests I …
c# unit-testing mocking httpcontextI have a method on an interface: string DoSomething(string whatever); I want to mock this with MOQ, so that …
c# mocking moqWhat the best way to simulate the user pressing "enter"? $(element).keypress() doesn't seem to allow me to pass in …
javascript jquery testing mockingI'm developing a project that has a number of hardware sensors connecting to the deployment machine through RS232 serial ports. …
windows mocking serial-port hardware-interface virtual-serial-portI am getting following exception while running the tests. I am using Mockito for mocking. The hints mentioned by Mockito …
java mocking mockito