All language subtitles for 388 The test lifecycle methods.en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic Download
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
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,510 --> 00:00:06,750 In the last video we learned about the setup method and how it can be used to execute some code before 2 00:00:06,780 --> 00:00:07,470 each test. 3 00:00:07,920 --> 00:00:13,460 And in addition to setup there are some other test lifecycle methods that we should know about. 4 00:00:13,620 --> 00:00:18,910 And this diagram represents the various metals that we could have inside the TEST file. 5 00:00:19,020 --> 00:00:26,510 So if we want we can write a number of tests which are all different but then we can add a setup method. 6 00:00:26,730 --> 00:00:30,660 And this contains code that is executed before each test. 7 00:00:30,960 --> 00:00:36,420 And we have seen a good example of that in the previous video where we have set the default locale for 8 00:00:36,420 --> 00:00:43,650 our date for mounting tests and then we can have a third down method which runs after each test. 9 00:00:43,650 --> 00:00:49,920 And this is normally used to dispose of some of the resources that were used during the test and then 10 00:00:49,920 --> 00:00:57,780 we also had set up all and tear down all metals which are only executed once before and after all the 11 00:00:57,780 --> 00:00:58,930 tests. 12 00:00:58,950 --> 00:01:05,610 So if you were to run a test file that contains this method this is the order in which each method will 13 00:01:05,610 --> 00:01:13,230 be called First of all we would get a call to set up all and then we would get set up test 1 and third 14 00:01:13,230 --> 00:01:20,400 down and this pattern would be repeated for each test and after third down is called for the last test 15 00:01:20,700 --> 00:01:23,670 then tear down all its gold as well. 16 00:01:23,790 --> 00:01:30,090 And as we make progress we will see some examples using these test metals but for now the key takeaway 17 00:01:30,240 --> 00:01:37,200 is that you can use setup tear down set up all and tell them all to execute some common code that you 18 00:01:37,200 --> 00:01:44,170 would otherwise have to repeat inside each test body and these hubs skipping your tests organized. 19 00:01:44,280 --> 00:01:44,520 OK. 20 00:01:44,550 --> 00:01:46,370 So let's continue on the next video. 2313

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