All language subtitles for 389 Completing the formatting tests.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
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,480 --> 00:00:05,380 In this video we are going to add some more tests for the remaining metals in this class. 2 00:00:05,520 --> 00:00:09,820 And the next method that we want to focus on is the day of the week. 3 00:00:09,840 --> 00:00:21,480 So for this method we are going to create a new group called Day of Week with G.B. locale. 4 00:00:22,440 --> 00:00:29,520 And then we can create a group body and then we are going to copy paste the setup matlab and the first 5 00:00:29,580 --> 00:00:38,130 test from the previous group and then we are going to adjust the first name to be Monday and we're going 6 00:00:38,130 --> 00:00:45,690 to make sure that we call format that day of week and that the expectation is the first three letters 7 00:00:45,720 --> 00:00:49,350 of Monday because this is a short format of the day of the week. 8 00:00:49,920 --> 00:00:57,550 And then we can run the tests once again and as we can see we get a success. 9 00:00:58,070 --> 00:00:58,370 OK. 10 00:00:58,400 --> 00:01:04,340 So now that we have this we could duplicate this group and test for example the same method but with 11 00:01:04,340 --> 00:01:05,760 a different locale. 12 00:01:05,840 --> 00:01:13,130 So here I could put a day a week but this time with the Italian locale and here I could change the default 13 00:01:13,130 --> 00:01:21,830 locale to I.T. on the score 90 and then I could change that description to unity which is the Italian 14 00:01:21,830 --> 00:01:25,240 for Monday and I can change the expectation to l you. 15 00:01:25,370 --> 00:01:27,850 And we would be what we expect. 16 00:01:27,890 --> 00:01:35,450 So I can run the tests one more time and as we can see the tests pass for the Italian locale as well. 17 00:01:35,510 --> 00:01:43,990 Moving on we could add some tests for the currency method so we could add a new group called currency. 18 00:01:45,230 --> 00:01:54,310 And this time for example with U S local and then I could add the group body and in here I can now set 19 00:01:54,310 --> 00:02:04,270 setup method and inside here I could said i n the l don't default to look out to and on the score U 20 00:02:04,360 --> 00:02:05,770 S like this. 21 00:02:05,870 --> 00:02:11,780 And because in this case we are not doing date for month and thus then I don't need to initialize date 22 00:02:11,810 --> 00:02:15,650 formatting so I can go straight on to writing the test. 23 00:02:15,650 --> 00:02:23,510 And just to make my life a bit quicker I'm going to copy these three tests from the hours group and 24 00:02:23,540 --> 00:02:29,790 I went to paste them into here and then I can update the expectations to ensure that we go form up the 25 00:02:29,790 --> 00:02:36,990 currency and here rather than 10 hours what we want to print is dollar number 10. 26 00:02:37,190 --> 00:02:37,910 Like this. 27 00:02:37,910 --> 00:02:44,760 And the second test will expect format the currency of zero to be an empty string. 28 00:02:44,780 --> 00:02:48,180 Because this is how this method is implemented. 29 00:02:48,200 --> 00:02:53,240 And finally we can implement the last test with minus five. 30 00:02:53,240 --> 00:02:59,390 And in this case we expect to see minus and then $ 5 like this. 31 00:03:00,320 --> 00:03:00,590 OK. 32 00:03:00,620 --> 00:03:07,700 So we have learned about testing code that does no date and currency formatting and adding more tests 33 00:03:07,790 --> 00:03:14,330 at this point would become repetitive because it is just about setting up a locale and writing the correct 34 00:03:14,390 --> 00:03:15,620 expectations. 35 00:03:15,620 --> 00:03:23,090 So at this stage I can run all the tests for this file and I can see that they are all green. 36 00:03:23,190 --> 00:03:25,350 So we can continue on the next video. 3969

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