All language subtitles for 388 The test lifecycle methods.en

af Afrikaans
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
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
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
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.