All language subtitles for 386 Grouping tests together.en

af Afrikaans
ak Akan
sq Albanian
am Amharic
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

Original subtitles

In the last few meters we have learned about the basics of unit testing in flutter and we are now ready

to test a class that is a little bit more complex than the non empty string validator and in the process

of doing this we will learn a bit more about the flutter testing API.

So as a next step we can open the four month class that we use to format our words dates and currency

values in the up.

And then we can add a new Dart file called for format on the score fast inside the test packets.

And like we have done before we can import faster test and we can also add a void Main method like this

and to make our life easier.

We can split up what Ed into and keep the did testify on the left and the file that we want to test

on the right.

And as we can see here we have four different methods and we could write multiple tests for each of

them.

So it would be nice if somehow we could group the tests that belong together.

And it turns out that we can do that by using a test group so we can type being group like this without

description.

And here we could type being ours and then we need to pass a closure like this.

And inside the body of this closure we cannot.

All the tests for this method.

So let's start with the first one.

And here I can type test a description of positive and then inside the test body.

I'm going to write expect that for month and I need to import this second draft format that house with

a parameter of 10 for example is equal to 10 H which is the string representation that I want and if

I want I can already run this test and as I can see.

Now this is green.

So we can continue.

Next I want to add more tests and I'm particularly interested in what happens when we pass zero.

When we pass on negative value and when we pass a decimal number so let's up this test quickly and I

can copy and paste this method in here I can rename the description to zero and I can pass for month

of ours with zero and I expect zero H and then I can do the same thing for the negative case.

And here I could pass for example hours of minus five and I'm still going to expect to see zero hours

because this is how this logic was implemented.

Finally I cannot the decimal case so I can copy paste this I'm going to name this decimal and I'm going

to pass a value of 4.5 an unexpected value of 4.5 H and then I can run all the tests again and I can

see that they have all passed.

OK so let's continue on the next video.

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