All language subtitles for 015 Movie Store Store – Part 4 (Task 2 & 3)_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian Download
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,330 --> 00:00:03,030 For this solution, we're gonna cover tasks two and three. 2 00:00:11,860 --> 00:00:16,870 Going back to the third test case, we need to write a unit test that expects cell movie to throw an 3 00:00:16,870 --> 00:00:19,180 exception if a movie has already been rented. 4 00:00:22,310 --> 00:00:25,340 So here I can write a unit test that expects an illegal state exception. 5 00:00:26,360 --> 00:00:27,830 Test expected. 6 00:00:29,390 --> 00:00:31,970 And it expects an illegal state exception. 7 00:00:35,300 --> 00:00:36,200 DECLASSE. 8 00:00:43,520 --> 00:00:46,400 The unit test is called Movie Night in Stock. 9 00:00:49,120 --> 00:00:50,920 First, I'll rent The Godfather. 10 00:01:02,820 --> 00:01:04,800 And then I'll try to sell The Godfather. 11 00:01:09,630 --> 00:01:10,980 If I run the test now. 12 00:01:14,050 --> 00:01:18,820 It fails, it's expecting the test to throw in a legal state exception, but it isn't. 13 00:01:20,120 --> 00:01:24,710 And so now we need to make the test pass by throwing an illegal -- exception from sell movie. 14 00:01:35,750 --> 00:01:37,670 If the movie is already rented. 15 00:02:02,200 --> 00:02:03,940 Throw an illegal STD exception. 16 00:02:19,520 --> 00:02:21,830 Rerun the test and perfect. 17 00:02:24,170 --> 00:02:30,140 And just have a look at how clean and elegant the code is, when you write tests, before you write 18 00:02:30,140 --> 00:02:33,560 code, you're being forced to write code that is easy to test. 19 00:02:34,100 --> 00:02:38,030 At the same time, code that is easy to test won't get any bugs. 20 00:02:40,400 --> 00:02:42,800 And now what I'm going to do is run every single test. 21 00:02:46,760 --> 00:02:51,470 They all pass, which means the code inside Staudt Java doesn't have any bugs. 22 00:02:52,580 --> 00:02:57,380 And before we wrap up, just I want you to really appreciate how polished our code is. 23 00:03:01,850 --> 00:03:08,270 Compared the old code with the new code in the old code, the functions were massive, this function 24 00:03:08,270 --> 00:03:09,940 here is impossible to test. 25 00:03:10,340 --> 00:03:13,430 So if you get a bug here, it's going to be really hard to fix. 26 00:03:14,000 --> 00:03:21,290 In general, this is not good coding, but with unit testing, our code is a lot cleaner and immune 27 00:03:21,290 --> 00:03:22,070 to bugs. 2514

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.