2,030 reputation
618
bio website blog.herby.sk
location Slovakia
age 40
visits member for 3 years, 6 months
seen yesterday

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.


Apr
15
answered Many different classes that need similar functionality. Best approach?
Apr
6
comment If this is camelCase what-is-this?
Sometimes called kebab-case, but hyphen-separated is also fine. What is important that libraries (like underscore.string actually know all these apart (camelCase, PascalCase, snake_case, kebab-case), albeit sometimes with different names, and allow you to use them as a fact of being.
Apr
6
answered Why should ViewModel route actions to Controller when using the MVCVM pattern?
Apr
6
awarded  Custodian
Apr
6
reviewed Approve Can non-IT people handle a wiki?
Apr
4
revised Inheritance or Composition?
edit after op edit, adding 'separate domain from presentation'
Apr
4
revised Inheritance or Composition?
fix
Apr
3
answered Inheritance or Composition?
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