| Time |
S |
Nick |
Message |
| 00:09 |
|
|
Voyage joined ##javaee |
| 00:19 |
|
|
VB1 joined ##javaee |
| 00:32 |
|
|
VB1 joined ##javaee |
| 01:11 |
|
|
VB1 joined ##javaee |
| 01:12 |
|
|
firebird1 joined ##javaee |
| 02:05 |
|
|
ibaca joined ##javaee |
| 02:37 |
|
|
VB1 joined ##javaee |
| 02:50 |
|
|
sternwanderer joined ##javaee |
| 02:51 |
|
|
VB1 joined ##javaee |
| 03:26 |
|
|
ramsrib joined ##javaee |
| 03:34 |
|
|
kobain_ joined ##javaee |
| 04:16 |
|
|
ibaca joined ##javaee |
| 06:17 |
|
|
ramsrib joined ##javaee |
| 07:54 |
|
|
SEx2 joined ##javaee |
| 08:27 |
|
|
kotten joined ##javaee |
| 11:44 |
|
|
ibaca joined ##javaee |
| 12:05 |
|
|
ibaca joined ##javaee |
| 12:18 |
|
|
ibaca joined ##javaee |
| 12:55 |
|
|
AlexCzar joined ##javaee |
| 12:55 |
|
AlexCzar |
Hi, guys |
| 13:01 |
|
|
drspockbr joined ##javaee |
| 13:16 |
|
AlexCzar |
I'm starting to write unit-test and have some understanding issues. I'm using JUnit4 + Mockito. How does one test a void command handler? Example: https://gist.github.com/AlexCzar/a81d537cd0fa6c58b5d5 |
| 13:17 |
|
AlexCzar |
Basically from my limited understanding such methods should be tested for side-effects (object saved into database). What should I Assert.assert* ? saved object fields one by one? |
| 13:20 |
|
acuzio |
AlexCzar: Good question ., |
| 13:21 |
|
acuzio |
AlexCzar: What i do is this - if a void method exists that does something (for e.g. save in a database) - then i would test that as part of the DB test - it makes it a "non-Unit Test" in the strictest sense but its the only valid way of doing it. |
| 13:22 |
|
acuzio |
AlexCzar: I also do not use Mocks ., they are a waste of time (in the majority of cases). |
| 13:23 |
|
AlexCzar |
acuzio, in my case it's either using mocks or completely abandoning majority of unit tests because I'd need full Spring context instantiation. |
| 13:24 |
|
acuzio |
AlexCzar: Spring has a Test harness for this very specific use-case |
| 13:24 |
|
AlexCzar |
acuzio, actually I'm not against this approach, I'm just testing different one at this moment. |
| 13:24 |
|
AlexCzar |
acuzio, yes, I know that, and I've already tried it for testing controllers. |
| 13:24 |
|
acuzio |
Fair enough , so thats your answer |
| 13:36 |
|
|
m1hael joined ##javaee |
| 13:38 |
|
m1hael |
hi, i am trying to deploy a rest service on a glassfish. but it seems it doesn't accept /my/service as path. /myservice though works nice. am i doing something wrong? i need an url like /my/service/rs/resource |
| 14:23 |
|
|
Naros joined ##javaee |
| 14:24 |
|
m1hael |
i think the topic for my problem is multi-level context-path? |
| 14:30 |
|
|
sternwanderer1 joined ##javaee |
| 14:41 |
|
AlexCzar |
Another unit-testing question: Instance of class A (named a) has instance of class B (named b) injected into it. I want to verify that a.myMethod() is calling b.otherMethod(c) where c is instanceof C and c.getPropertyA().equals("asdf"); how do I do that? :) |
| 14:42 |
|
AlexCzar |
Mockito.verify comes close but it wants to compare actual and expected arguments to b.otherMethod via c.equals(otherInstanceOfC) |
| 14:43 |
|
AlexCzar |
Oh, just found ArgumetnMatcher and ArgumentCaptor :) disregard my previous question |
| 15:14 |
|
|
m1hael left ##javaee |
| 16:07 |
|
|
firebird1 joined ##javaee |
| 16:35 |
|
|
sternwanderer joined ##javaee |
| 16:49 |
|
|
Naros left ##javaee |
| 16:57 |
|
acuzio |
AlexCzar: you must have a lot of time in your hand |
| 17:00 |
|
|
neuro_sys joined ##javaee |
| 17:18 |
|
|
sfisque joined ##javaee |
| 17:27 |
|
AlexCzar |
I just take a break once a fortnight :D And my girlfriend is also my coworker, so, I just work :D |
| 17:32 |
|
|
Voyage joined ##javaee |
| 17:46 |
|
neuro_sys |
home office? |
| 18:01 |
|
|
AlexCzar joined ##javaee |
| 18:04 |
|
AlexCzar |
neuro_sys, work office, home office, coffee-shop office, etc. :D |
| 18:05 |
|
AlexCzar |
one sacred place is the bed, it's off limits for work :D |
| 18:29 |
|
neuro_sys |
sounds neat |
| 18:29 |
|
neuro_sys |
adopt me |
| 19:55 |
|
|
kobian joined ##javaee |
| 20:44 |
|
|
sheenobu joined ##javaee |
| 21:38 |
|
AlexCzar |
neuro_sys, my cat is quite enough for the time being :D Although I do think about adopting a dog, but not human, not now :D |
| 22:33 |
|
|
Naros joined ##javaee |
| 22:48 |
|
|
Naros left ##javaee |
| 23:11 |
|
|
firebird1 joined ##javaee |
| 23:50 |
|
|
pdave joined ##javaee |