1,956 reputation
617
bio website blog.herby.sk
location Slovakia
age 40
visits member for 3 years, 4 months
seen 9 hours ago

Garbage-collecting duck-typer. Test-infected. Hopefully he is not alone who would like UNIX rewritten with GC memory and closure support in system, kernel API in Javascript, (Python, Ruby, Smalltalk), and C layer deprecated and emulated on top of the former.

I use Windows on workstation and FreeBSD on server.

Recently dipped myself into the mobile app world.


Mar
1
awarded  Scholar
Mar
1
accepted How to unit test correct implementation of an interface is used?
Feb
26
revised How to unit test correct implementation of an interface is used?
Adding @jbrains dialogue resuts
Feb
26
answered How to unit test correct implementation of an interface is used?
Feb
26
comment How to unit test correct implementation of an interface is used?
@ThomasRuiz Interesting one. Using the vocabulary of it, I realized I rarely write other than contract tests - but without its counterpart, so @jbrains would not accept them as those, since there is no matching, but I do not like to overmock everything, so I mostly skip them. But that sweet spot, the place where the objects to fulfill the contract is instantiated, is not covered. In an aftermath, it looks that the problem is the new FooImpl(bar) in Java/JavaScript. If it was createFoo(bar) consistently, I could run my contract test against its result, not against new FooImpl(testbar).
Feb
25
comment How to unit test correct implementation of an interface is used?
That's what I mentioned by createApp(indirectA, indirectB).getFoo() just did not call it sociable test. That's what I basically do now.
Feb
25
comment How to unit test correct implementation of an interface is used?
Testing that should "drive the process" and / or "give early feedback" should not be that hard, or it loses its meaning. Testing for testing correctness, there yes.
Feb
25
comment How to unit test correct implementation of an interface is used?
Yes, I was concerned about the third case. I have some feeling towards "do not test it and make it as obvious as possible" as well. Just wasn't that sure. I would still have bad feelings a bit and will feel the need for some smoke test anyway.
Feb
25
comment How to unit test correct implementation of an interface is used?
That's duplication, though. You essentially copy same tests you did in unit tests (not always, of course, but for some scenarios, when the number of combinations in sub-part is big, integration test must test them all, albeit in complicated setup).
Feb
25
comment How to unit test correct implementation of an interface is used?
@ThomasRuiz Thanks, I will look.
Feb
25
comment How to unit test correct implementation of an interface is used?
@Doval Yes, but I should test that some object was actually created, and that that object is correct. The question is, how to test the glue code that creates and setups it, when you already have full coverage on the class itself, but how to test the code that may look like var client = new FooClient(); client.connect(this.config.foo);. This code, that actually creates the pieces and glues them, should be tested, too; the question is, how.
Feb
25
revised How to unit test correct implementation of an interface is used?
added 85 characters in body
Feb
25
comment How to unit test correct implementation of an interface is used?
I don't have the problem of "not importing the mocks". I have the problem of "test that the thing instantiated is the right one". Especially in the duck-typing world. So when there is some this.foo = new Bar(this.baz, this.quux) somewhere in the glue code, how to sanely test the this.foo is actually the good object implementing all the behaviour that is wanted, initialized properly, etc.
Feb
25
comment How to unit test correct implementation of an interface is used?
@Doval I don't understand.
Feb
25
awarded  Student
Feb
25
asked How to unit test correct implementation of an interface is used?
Feb
3
answered What to use instead of IDs in selectors in CSS
Jan
7
revised Lower and Upper bound of an algorithm
typo in title
Jan
7
suggested approved edit on Lower and Upper bound of an algorithm
Dec
20
revised Why is Win32 API's WM_MOVE being called while dragging the window?
Question is not about C++, the WM_MSGNAME constants are used in other SDKs for Windows development as well