Involuntary Bug-Hunting

by Andi

In the laboratory database must be in the final task 3, a small flight reservation system write. In the end, it is also necessary to search for flights based on certain conditions (to, from, the earliest date, latest date, class). So far so good. According to the requirement to test each method with JUnit tests. Since my group is predisposed but something practical we played yesterday the process by a search. That is, we only give ran and all flights (between 2004 and 2010) and sought us out of two flights on two consecutive days. Shortly into the search given the appropriate criteria, send -> "No flights!" .... Huh?
From then on, write off we went on the flight data in order not to look for wrong things, eternal in the source code rumfuhrwerken to be in the database by hand using select behold what data there. We could not believe our eyes. In the flight overview in the program as of 18 08 .2006, but the database spat 18th 2009 from .2006. Still ensure that it is also the same flight, but since we had not wasted. We noted then that the surface we spent a month earlier than was in the database and could then track the Prof Mr Bröckl the whole thing.
Together we came to the solution of that in a Util class takes the appearance of the surface of the date by hand. Since the counting starts with 0 internally but lacked a +1, since in this case the month of September and not just 8 August.
With the hunt for the error we spent yesterday's appointment of the database laboratory and could actually be ready.


Comment

Yes, I would like to be notified of comments!