Skip to content

borisbonchev/week_10_inthepub-borisbonchev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

In the pub

Goal: Your task is to implement and test the process of drinking beer in a pub. Write unit tests to test: . If your implementation works and . If it conforms to the specification . if exceptions are properly handled.

Work test driven!

Background info

This exercise focus on

Here are the specifications of this exercise. Turn them into testable requirements before you start your TDD process.

  1. Initially the pub has 100L of beer available (check the MainSimulation class).

  2. A barkeeper and beer drinkers belong to a Pub.

  3. Beer drinkers can ask the barkeeper for beer.

  4. Beer is handed out either in small format (0.2L) or pint format (0.57L).

  5. Beer drinkers can only drink a limited amount of beer, between 2L and 5L.

TODO

The BarkeeperTest class has the needed variables and the "beforeEach" method. use them in your tests.

  1. Implement the barkeeper test!

  2. Implement the getMessageOrDefault();

In your first test method, you want to test whether the tapping of beer works as intended. Let the test fail first, then implement the logic of that test. When you have finished,continue to the next part.

The exercise is finished when you have tested and implemented each requirement.

About

Abstract application that emulates drinking beer in a pub

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published