package Ġcom . github . go tham 2 5 . tur bo api . util test Ċ Ċ import Ġkotlin . test . Test Ċ import Ġkotlin . test . assertEquals Ċ import Ġcom . github . go tham 2 5 . tur b osm tp . util . Json Builder Ċ Ċ /** Ċ Ġ* ĠThis Ġis Ġa Ġtest Ġclass Ġfor ĠJson Builder Ġclass . Ċ Ġ* Ċ Ġ*/ Ċ class ĠJson Builder Test Ġ{ Ċ ĉ @ Test Ġfun Ġtest Build () Ġ{ Ċĉ ĉ var Ġclass UnderTest Ġ= ĠJson Builder . Builder () Ċĉĉĉĉĉĉĉ ĉ . auth User (" Dummy User ") Ċĉĉĉĉĉĉĉ ĉ . auth Pass (" Dummy Pass @ 1 2 3 ") Ċĉĉĉĉĉĉĉ ĉ . from (" sample 1 2 3 @ gmail . com ") Ċĉĉĉĉĉĉĉ ĉ . to (" sample 4 5 6 @ gmail . com ") ĊĉĉĊĉ ĉ assertEquals ("{ \" auth user \":\" Dummy User \",\" auth pass \":\" Dummy Pass @ 1 2 3 \",\" from \":\" sample 1 2 3 @ gmail . com \",\" to \":\" sample 4 5 6 @ gmail . com \" }", Ġclass UnderTest . build ()) ĊĉĉĊĉ ĉ class UnderTest Ġ= Ġclass UnderTest Ċĉĉĉĉĉĉ ĉ . subject (" test Ġsubject ") ĊĉĉĊĉĉĊĉ ĉ assertEquals ("{ \" auth user \":\" Dummy User \",\" auth pass \":\" Dummy Pass @ 1 2 3 \",\" from \":\" sample 1 2 3 @ gmail . com \",\" to \":\" sample 4 5 6 @ gmail . com \",\" subject \":\" test Ġsubject \" }", Ġclass UnderTest . build ()) ĊĉĉĊĉ ĉ class UnderTest Ġ= Ġclass UnderTest Ċĉĉĉĉĉĉ ĉ . cc (" sample 7 8 9 @ gmail . com ") ĊĉĉĊĉ ĉ assertEquals ("{ \" auth user \":\" Dummy User \",\" auth pass \":\" Dummy Pass @ 1 2 3 \",\" from \":\" sample 1 2 3 @ gmail . com \",\" to \":\" sample 4 5 6 @ gmail . com \",\" subject \":\" test Ġsubject \",\" cc \":\" sample 7 8 9 @ gmail . com \" }", Ġclass UnderTest . build ()) ĊĉĉĊĉ ĉ class UnderTest Ġ= Ġclass UnderTest Ċĉĉĉĉĉĉ ĉ . bcc (" test 1 2 3 @ gmail . com ") ĊĉĉĊĉ ĉ assertEquals ("{ \" auth user \":\" Dummy User \",\" auth pass \":\" Dummy Pass @ 1 2 3 \",\" from \":\" sample 1 2 3 @ gmail . com \",\" to \":\" sample 4 5 6 @ gmail . com \",\" subject \":\" test Ġsubject \",\" cc \":\" sample 7 8 9 @ gmail . com \",\" bcc \":\" test 1 2 3 @ gmail . com \" }", Ġclass UnderTest . build ()) ĊĉĉĊĉ ĉ class UnderTest Ġ= Ġclass UnderTest Ċĉĉĉĉĉĉ ĉ . content (" Sample Ġplain Ġtext Ġcontent ") ĊĉĉĊĉ ĉ assertEquals ("{ \" auth user \":\" Dummy User \",\" auth pass \":\" Dummy Pass @ 1 2 3 \",\" from \":\" sample 1 2 3 @ gmail . com \",\" to \":\" sample 4 5 6 @ gmail . com \",\" subject \":\" test Ġsubject \",\" cc \":\" sample 7 8 9 @ gmail . com \",\" bcc \":\" test 1 2 3 @ gmail . com \",\" content \":\" Sample Ġplain Ġtext Ġcontent \" }", Ġclass UnderTest . build ()) ĊĉĉĊĉ ĉ class UnderTest Ġ= Ġclass UnderTest Ċĉĉĉĉĉĉ ĉ . html Content ("< body > Sample Ġhtml Ġcontent </ body >") ĊĉĉĊĉ ĉ assertEquals ("{ \" auth user \":\" Dummy User \",\" auth pass \":\" Dummy Pass @ 1 2 3 \",\" from \":\" sample 1 2 3 @ gmail . com \",\" to \":\" sample 4 5 6 @ gmail . com \",\" subject \":\" test Ġsubject \",\" cc \":\" sample 7 8 9 @ gmail . com \",\" bcc \":\" test 1 2 3 @ gmail . com \",\" content \":\" Sample Ġplain Ġtext Ġcontent \",\" html _ content \":\" < body > Sample Ġhtml Ġcontent </ body > \" }", Ġclass UnderTest . build ()) ĊĊĉ ĉ class UnderTest Ġ= Ġclass UnderTest Ċĉĉĉĉĉĉ ĉ . custom Headers ("{ \" X - key 1 \":\" value 1 \", Ġ\" X - key 2 \":\" value 2 \" }") ĊĉĉĊĉ ĉ assertEquals ("{ \" auth user \":\" Dummy User \",\" auth pass \":\" Dummy Pass @ 1 2 3 \",\" from \":\" sample 1 2 3 @ gmail . com \",\" to \":\" sample 4 5 6 @ gmail . com \",\" subject \":\" test Ġsubject \",\" cc \":\" sample 7 8 9 @ gmail . com \",\" bcc \":\" test 1 2 3 @ gmail . com \",\" content \":\" Sample Ġplain Ġtext Ġcontent \",\" html _ content \":\" < body > Sample Ġhtml Ġcontent </ body >\ ", \" custom _ headers \":{\" X - key 1 \":\" value 1 \", Ġ\" X - key 2 \":\" value 2 \" }} ", Ġclass UnderTest . build ()) ĊĉĉĊĉ ĉ class UnderTest Ġ= Ġclass UnderTest Ċĉĉĉĉĉĉ ĉ . raw Mime (" Sample Ġraw Ġmime Ġmessage ") ĊĉĉĊĉ ĉ assertEquals ("{ \" auth user \":\" Dummy User \",\" auth pass \":\" Dummy Pass @ 1 2 3 \",\" from \":\" sample 1 2 3 @ gmail . com \",\" to \":\" sample 4 5 6 @ gmail . com \",\" subject \":\" test Ġsubject \",\" cc \":\" sample 7 8 9 @ gmail . com \",\" bcc \":\" test 1 2 3 @ gmail . com \",\" content \":\" Sample Ġplain Ġtext Ġcontent \",\" html _ content \":\" < body > Sample Ġhtml Ġcontent </ body >\ ", \" custom _ headers \":{\" X - key 1 \":\" value 1 \", Ġ\" X - key 2 \":\" value 2 \" }, \" mime _ raw \":\" Sample Ġraw Ġmime Ġmessage \" }", Ġclass UnderTest . build ()) Ċĉĉ ĠĊ ĉ } Ċ }