Skip to Content
Softwareentwicklung von Kopf bis Fuß
book

Softwareentwicklung von Kopf bis Fuß

by Dan Pilone, Russ Miles
July 2008
Intermediate to advanced
496 pages
10h 40m
German
O'Reilly Verlag
Content preview from Softwareentwicklung von Kopf bis Fuß

9.17. Halten Sie Ihren Testcode bei Ihren Tests

Jetzt müssen wir nur noch eine Implementierung für DBAccessor schreiben, die die Methode bestVerarbeiten() verwenden kann, und die Testmethode testEinfacheBestellung() fertigstellen. Aber die Testimplementierung von DBAccessor wird wirklich nur für Tests verwendet, gehört also zu Ihren Testklassen, nicht in Ihren Produktionscode:

Dieser Code befindet sich in unserer Testklasse, die in einem anderen Verzeichnis steckt als unser Produktionscode.

public class TestBestellungsverarbeitung {
  // Weitere Tests

  public class TestAccessor implements DBAccessor {
				public Gutschein getGK(int gcId) {
				  Gutschein gc = new Gutschein();
				  gc.setAktivierungsdatum(new Date());
				  gc.setVerfallsdatum(new Date());
				 gc.setBetrag(new ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

HTML5-Programmierung von Kopf bis Fuß

HTML5-Programmierung von Kopf bis Fuß

Eric Freeman, Elisabeth Robson
JavaScript-Programmierung von Kopf bis Fuß

JavaScript-Programmierung von Kopf bis Fuß

Eric Freeman, Elisabeth Robson
Programmieren von Kopf bis Fuß

Programmieren von Kopf bis Fuß

David Griffiths, Paul Barry

Publisher Resources

ISBN: 9783897218628