Questions tagged [mocks]

In object-oriented programming, mock objects are simulated objects that mimic the behavior of real objects in controlled ways. A programmer typically creates a mock object to test the behavior of some other object, in much the same way that a car designer uses a crash test dummy to simulate the dynamic behavior of a human in vehicle impacts.

5 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
26 views

C++ Sql-like base operating on csv files

I implemented very constrained trivial implementation of sql querries operating on user files (in csv format). Where possible i tried to use modern C++ features. The fancy goal is to serve MySql ...
2
votes
0answers
49 views

Android+Firebase testing using Mockito

I have an interactor/usecase class in my application. My application follows MVVM architecture with interactor/usecases responsible for logic (e.g. get data from api-service, store in local-database ...
1
vote
0answers
56 views

Testable filesystem Writer for logging, with log rotation

I want to implement a custom Writer that allows the native go logger to do log rotation, and I also wanted to be able to write tests for it. The general idea was ...
1
vote
0answers
587 views

Mocking protocol with class/static functions in Swift

I am using one of the open-source Objective-C keychain wrappers to store data in iOS keychain. For test cases, I have created protocol as: ...
1
vote
0answers
47 views

Testing a method which coordinates multiple objects

I have this class with one method, which uses three different objects to perform a task. ...