Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions exercises/practice/micro-blog/MicroBlog.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,113 +4,113 @@ BeforeAll {

Describe "MicroBlog test cases" {
It "English language short" {
$got = Invoke-MicroBlog("Hi")
$got = Invoke-MicroBlog -Post "Hi"
$want = "Hi"

$got | Should -BeExactly $want
}

It "English language long" {
$got = Invoke-MicroBlog("Hello there")
$got = Invoke-MicroBlog -Post "Hello there"
$want = "Hello"

$got | Should -BeExactly $want
}

It "German language short (broth)" {
$got = Invoke-MicroBlog("brühe")
It "German language short -Post broth " {
$got = Invoke-MicroBlog -Post "brühe"
$want = "brühe"

$got | Should -BeExactly $want
}

It "German language long (bear carpet → beards)" {
$got = Invoke-MicroBlog("Bärteppich")
It "German language long -Post bear carpet → beards " {
$got = Invoke-MicroBlog -Post "Bärteppich"
$want = "Bärte"

$got | Should -BeExactly $want
}

It "Bulgarian language short (good)" {
$got = Invoke-MicroBlog("Добър")
It "Bulgarian language short -Post good " {
$got = Invoke-MicroBlog -Post "Добър"
$want = "Добър"

$got | Should -BeExactly $want
}

It "Greek language short (health)" {
$got = Invoke-MicroBlog("υγειά")
It "Greek language short -Post health " {
$got = Invoke-MicroBlog -Post "υγειά"
$want = "υγειά"

$got | Should -BeExactly $want
}

It "Maths short" {
$got = Invoke-MicroBlog("a=πr²")
$got = Invoke-MicroBlog -Post "a=πr²"
$want = "a=πr²"

$got | Should -BeExactly $want
}

It "Maths long" {
$got = Invoke-MicroBlog("∅⊊ℕ⊊ℤ⊊ℚ⊊ℝ⊊ℂ")
$got = Invoke-MicroBlog -Post "∅⊊ℕ⊊ℤ⊊ℚ⊊ℝ⊊ℂ"
$want = "∅⊊ℕ⊊ℤ"

$got | Should -BeExactly $want
}

It "English and emoji short" {
$got = Invoke-MicroBlog("Fly 🛫")
$got = Invoke-MicroBlog -Post "Fly 🛫"
$want = "Fly 🛫"

$got | Should -BeExactly $want
}

It "Emoji short" {
$got = Invoke-MicroBlog("💇")
$got = Invoke-MicroBlog -Post "💇"
$want = "💇"

$got | Should -BeExactly $want
}

It "Emoji long" {
$got = Invoke-MicroBlog("❄🌡🤧🤒🏥🕰😀")
$got = Invoke-MicroBlog -Post "❄🌡🤧🤒🏥🕰😀"
$want = "❄🌡🤧🤒🏥"

$got | Should -BeExactly $want
}

It "Royal Flush?" {
$got = Invoke-MicroBlog("🃎🂸🃅🃋🃍🃁🃊")
$got = Invoke-MicroBlog -Post "🃎🂸🃅🃋🃍🃁🃊"
$want = "🃎🂸🃅🃋🃍"

$got | Should -BeExactly $want
}

#Those below are extra tests for this track
It "Chess pieces" {
$got = Invoke-MicroBlog("♜♞♝♛♚♟︎")
$got = Invoke-MicroBlog -Post "♜♞♝♛♚♟︎"
$want = "♜♞♝♛♚"

$got | Should -BeExactly $want
}

It "Zodiac signs" {
$got = Invoke-MicroBlog("♈︎♉︎♊︎♋︎♌︎♍︎♎︎♏︎♐︎♑︎♒︎♓︎")
$got = Invoke-MicroBlog -Post "♈︎♉︎♊︎♋︎♌︎♍︎♎︎♏︎♐︎♑︎♒︎♓︎"
$want = "♈︎♉︎♊︎♋︎♌︎"

$got | Should -BeExactly $want
}

It "Music notes" {
$got = Invoke-MicroBlog("𝄠♭𝅘𝅥𝆕♫♬𝅘𝅥𝅯♯")
$got = Invoke-MicroBlog -Post "𝄠♭𝅘𝅥𝆕♫♬𝅘𝅥𝅯♯"
$want = "𝄠♭𝅘𝅥𝆕♫"

$got | Should -BeExactly $want
}

It "Egyptian Hieroglyphs" {
$got = Invoke-MicroBlog("𓂀𓅁𓅊𓁁☥𓁏")
$got = Invoke-MicroBlog -Post "𓂀𓅁𓅊𓁁☥𓁏"
$want = "𓂀𓅁𓅊𓁁☥"

$got | Should -BeExactly $want
Expand Down