Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

A concern about your design #2

Open
AlexLuya opened this issue Dec 21, 2013 · 1 comment
Open

A concern about your design #2

AlexLuya opened this issue Dec 21, 2013 · 1 comment

Comments

@AlexLuya
Copy link

Base introduction,mock4go provided a way to mock part of functions of an instance,it looks like partial mocking in some java mocking framework,but this can be used to replace interface mocking.for example,A-->B-->C--->D,here,each arrow represents a dependency,If user wants to unit testing A,wih mock4go,he will need to create complete dependency graph due to there is no way to mock B completely.

@jvshahid
Copy link
Owner

I'm not sure i understand the problem here. If the goal is to unit test A then A should be initialized with a mocked version of B, which doesn't require initializing B's dependencies. What am i missing ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants