Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify constructor #714

Open
fernando-s97 opened this issue Nov 2, 2023 · 1 comment
Open

Verify constructor #714

fernando-s97 opened this issue Nov 2, 2023 · 1 comment

Comments

@fernando-s97
Copy link

I have a class A that has a method b().

The method B creates the object C with some specific args and execute the d() method.

So A().b() calls C(specific args).d().

The signature of B and D methods are the same. A only exists to create C with those specifics Args. So it's kind of a proxy in order to be aligned to DRY and not call C(specific args) multiple times in different places + be more semantic. B is a generic name and D is a better name for my specific use case.

I already have all the tests written for A and B, but since C.d is a proxy to A.b that only specifies custom logic to the constructor, I don't want to retest everything again. I only want to make sure C was called with the correct arguments.

How could I do this?

@srawlins
Copy link
Member

srawlins commented Nov 2, 2023

Thanks for the question! There are very few developers who work on this package (you can count them on one hand), so we recommend asking questions like this on a user forum with more people available to answer, such as StackOverflow.

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

No branches or pull requests

2 participants