Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
If you write your tests first, then you'll be forced to write code that is easy to test at the same
time, code that is easy to test is immune to bugs, and it tends to be more polished.
So the first step of test driven development is to identify meaningful test cases from the requirements
when the cart adds an item to its collection.
We need to check if the cart contains the item that was just added.
So test if the cart contains the item.
After it's added.
We also got to make sure the cart doesn't add an item that it already contains.
Test if the cart.
Scheps duplicate item.
And now there's another requirement about removing an item, so we're going to test if the item.
Gets removed after being sold.
And the code to throw an exception, if the user tries to remove from an empty cart, so test for an
illegal state exception.
We're trying to remove from an empty cart.
And for this requirement, we got a test of the subtotal as calculated correctly.
Test if the tax is calculated correctly.
Test for the total.
And we're also going to test for an illegal state acceptant for trying to check out an empty cart.
If every test passes, we can rest assured that our code doesn't have any bugs.
All right.
That is all for part one.
We've identified every meaningful test case and now we can start unit testing.
See you soon.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.