Closed GoogleCodeExporter closed 9 years ago
Well, all is ok, but i should have AuditoriumImpl to Create Auditorium from
database in Class TopicSqlImpl method getAllEvents();
Original comment by dnsj...@gmail.com
on 9 Nov 2012 at 10:35
auditorium is an optional field of event, so you don't really need it. From
code compilation point, you have Auditorium interface and that must be enough
Original comment by dbarashev
on 9 Nov 2012 at 11:03
http://pastebin.com/sd9XJZLM
Could you look at this please? I dont know why program thinks that database
TimeSlot is empty, where I just created ts1 and put it into database
Original comment by dnsj...@gmail.com
on 14 Nov 2012 at 10:42
If your test extends SqlTestCase then it doesn't talk to DBMS at all. You
describe what queries do you expect, and *you* provide result set using
Expectations.withResult() method
Original comment by dbarashev
on 14 Nov 2012 at 10:48
oh, i understand, thanks
Original comment by dnsj...@gmail.com
on 14 Nov 2012 at 3:19
Well, testAddEvent works, but in testGetEvents i have problem: i cant get Date,
i mean when in getEvents i call rs.getDate("start_date") - it is null. But in
test method i said, that "start_date" is sqlDate. if "start_date" in test is
string, all is ok. Or if "start_date" is int, all is ok too.
And, also could you fix table Event?
Original comment by dnsj...@gmail.com
on 14 Nov 2012 at 5:38
Right, getDate() doesn't work yet in a mocking SqlAPi. Wait a little bit...
Original comment by dbarashev
on 14 Nov 2012 at 6:35
Another question: In TimeSlotExtentSqlImpl i know, how i can get id. But in
TimeSlotExtentImpl..i can creat ID in this class and do ID++, or create
TimeSlotSqlImpl where will field getID, and delete getID from TimeSlotImpl.
Whats better?
Original comment by dnsj...@gmail.com
on 20 Nov 2012 at 2:54
Yes, just increment a counter, or get the size of time slot collection and add
1.
Original comment by dbarashev
on 20 Nov 2012 at 3:16
Thanks, and could you remind me please, how easily get id from db in method
create, where i just insert my time slot?
Original comment by dnsj...@gmail.com
on 20 Nov 2012 at 4:23
select id from TimeSlot WHERE day=? AND name=? AND is_odd=?
Original comment by dbarashev
on 20 Nov 2012 at 4:25
This issue was closed by revision dadb3f33b931.
Original comment by dbarashev
on 25 Nov 2012 at 3:20
Original issue reported on code.google.com by
dbarashev
on 8 Nov 2012 at 10:06