local o=require("\078\101\120\117\115\085\110\105\116\084\101\115\116\105\110\103")local T=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local m=game:GetService("\072\116\116\112\083\101\114\118\105\099\101")local w=require((T:WaitForChild("\080\114\111\106\101\099\116")):WaitForChild("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101"))local e=w:GetResource("\083\116\097\116\101\046\081\117\101\115\116\115")local C=o.UnitTest:Extend()function C.Setup(o)local T=Instance.new("\070\111\108\100\101\114")local m=Instance.new("\070\111\108\100\101\114")m.Name="\080\108\097\121\101\114\068\097\116\097"m.Parent=T local w=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")w.Name="\073\110\118\101\110\116\111\114\121"w.Value="\091\093"w.Parent=m o.InventoryValue=w local C=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")C.Name="\081\117\101\115\116\115"C.Value="\091\093"C.Parent=m o.QuestsValue=C o.CuT=e.GetQuests(T)end function C.SetInventory(T,o)local w={}for o,T in pairs(o)do w[tostring(o)]={Name=T}end T.InventoryValue.Value=m:JSONEncode(w)end function C.SetQuests(T,o)T.QuestsValue.Value=m:JSONEncode(o)end function C.AssertDialog(m,o,T)local w=m.CuT:GetDialogForNPC(o)if w==nil then if T~=nil then m:Fail("\078\111 \100\105\097\108\111\103 \119\097\115 \114\101\116\117\114\110\101\100\046")else return end end m:AssertEquals(w.Name,T,"\087\114\111\110\103 \100\105\097\108\111\103 \119\097\115 \114\101\116\117\114\110\101\100\046")end o:RegisterUnitTest((C.new("\084\101\115\116\081\117\101\115\116\067\111\110\100\105\116\111\110\086\097\108\105\100")):SetRun(function(o)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\078\111\116\085\110\108\111\099\107\101\100"),true)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\084\117\114\110\101\100\073\110"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116",{"\065\108\108\073\116\101\109\115";"\084\117\114\110\101\100\073\110"}),false)o:SetQuests({ActiveQuests={["\077\101\099\104 \083\117\105\116"]=true};CompletedQuests={}})o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\073\110\118\101\110\116\111\114\121"),true)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\084\117\114\110\101\100\073\110"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116",{"\065\108\108\073\116\101\109\115";"\084\117\114\110\101\100\073\110"}),false)o:SetInventory({"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116";"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116"})o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\073\110\118\101\110\116\111\114\121"),true)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\084\117\114\110\101\100\073\110"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116",{"\065\108\108\073\116\101\109\115";"\084\117\114\110\101\100\073\110"}),false)o:SetInventory({"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116";"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116";"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116"})o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\065\108\108\073\116\101\109\115"),true)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\084\117\114\110\101\100\073\110"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116",{"\065\108\108\073\116\101\109\115";"\084\117\114\110\101\100\073\110"}),true)o:SetQuests({ActiveQuests={};CompletedQuests={["\077\101\099\104 \083\117\105\116"]=true}})o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116","\084\117\114\110\101\100\073\110"),true)o:AssertEquals(o.CuT:QuestConditonValid("\077\101\099\104 \083\117\105\116",{"\065\108\108\073\116\101\109\115","\084\117\114\110\101\100\073\110"}),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\078\111\116\085\110\108\111\099\107\101\100"),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\084\117\114\110\101\100\073\110"),false)o:SetQuests({ActiveQuests={["\070\105\110\100 \084\101\108\097\109\111\109"]=true};CompletedQuests={}})o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\073\110\118\101\110\116\111\114\121"),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\065\108\108\073\116\101\109\115"),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\084\117\114\110\101\100\073\110"),false)o:SetQuests({ActiveQuests={},CompletedQuests={["\070\105\110\100 \084\101\108\097\109\111\109"]=true}})o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\105\110\100 \084\101\108\097\109\111\109","\084\117\114\110\101\100\073\110"),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\078\111\116\085\110\108\111\099\107\101\100"),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\084\117\114\110\101\100\073\110"),false)o:SetQuests({ActiveQuests={["\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"]=true},CompletedQuests={}})o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\073\110\118\101\110\116\111\114\121"),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\084\117\114\110\101\100\073\110"),false)o:SetInventory({PetCostumeHat="\080\101\116\067\097\116\067\111\115\116\117\109\101\072\097\116",PetCostumeCollar="\080\101\116\067\111\115\116\117\109\101\067\111\108\108\097\114",PetCostumeAnkle="\080\101\116\067\097\116\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\073\110\118\101\110\116\111\114\121"),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\084\117\114\110\101\100\073\110"),false)o:SetInventory({PetCostumeHat="\080\101\116\067\097\116\067\111\115\116\117\109\101\072\097\116";PetCostumeCollar="\080\101\116\067\111\115\116\117\109\101\067\111\108\108\097\114";PetCostumeBack="\080\101\116\083\119\097\109\112\077\111\110\115\116\101\114\067\111\115\116\117\109\101\067\097\112\101";PetCostumeAnkle="\080\101\116\067\097\116\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\073\110\118\101\110\116\111\114\121"),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\084\117\114\110\101\100\073\110"),false)o:SetInventory({PetCostumeHat="\080\101\116\067\097\116\067\111\115\116\117\109\101\072\097\116",PetCostumeCollar="\080\101\116\067\111\115\116\117\109\101\067\111\108\108\097\114";PetCostumeBack="\080\101\116\067\097\116\067\111\115\116\117\109\101\067\097\112\101",PetCostumeAnkle="\080\101\116\067\097\116\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\065\108\108\073\116\101\109\115"),true)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\084\117\114\110\101\100\073\110"),false)o:SetQuests({ActiveQuests={},CompletedQuests={["\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"]=true}})o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110","\084\117\114\110\101\100\073\110"),true)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\078\111\116\085\110\108\111\099\107\101\100"),true)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\084\117\114\110\101\100\073\110"),false)o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true};CompletedQuests={}})o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\073\110\118\101\110\116\111\114\121"),true)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\084\117\114\110\101\100\073\110"),false)o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true};CompletedQuests={},MonsterKillCounters={["\083\119\097\109\112 \087\111\108\102"]=4}})o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\073\110\118\101\110\116\111\114\121"),true)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\084\117\114\110\101\100\073\110"),false)o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true};CompletedQuests={};MonsterKillCounters={["\083\119\097\109\112 \087\111\108\102"]=15}})o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\065\108\108\073\116\101\109\115"),true)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\084\117\114\110\101\100\073\110"),false)o:SetQuests({ActiveQuests={};CompletedQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true}})o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\078\111\116\085\110\108\111\099\107\101\100"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\073\110\118\101\110\116\111\114\121"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\065\108\108\073\116\101\109\115"),false)o:AssertEquals(o.CuT:QuestConditonValid("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115","\084\117\114\110\101\100\073\110"),true)end))o:RegisterUnitTest((C.new("\084\101\115\116\071\101\116\083\116\097\116\117\115\073\099\111\110")):SetRun(function(o)o:AssertEquals(o.CuT:GetStatusIcon("\077\101\099\104 \083\117\105\116"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\051\052\051\054\057\050\048")o:SetQuests({ActiveQuests={["\077\101\099\104 \083\117\105\116"]=true},CompletedQuests={}})o:AssertEquals(o.CuT:GetStatusIcon("\077\101\099\104 \083\117\105\116"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\054\051")o:SetInventory({"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116";"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116"})o:AssertEquals(o.CuT:GetStatusIcon("\077\101\099\104 \083\117\105\116"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\054\051")o:SetInventory({"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116";"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116";"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116"})o:AssertEquals(o.CuT:GetStatusIcon("\077\101\099\104 \083\117\105\116"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\056\056")o:SetQuests({ActiveQuests={};CompletedQuests={["\077\101\099\104 \083\117\105\116"]=true}})o:AssertEquals(o.CuT:GetStatusIcon("\077\101\099\104 \083\117\105\116"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\057\048\051")o:AssertEquals(o.CuT:GetStatusIcon("\070\105\110\100 \084\101\108\097\109\111\109"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\051\052\051\054\057\050\048")o:SetQuests({ActiveQuests={["\070\105\110\100 \084\101\108\097\109\111\109"]=true},CompletedQuests={}})o:AssertEquals(o.CuT:GetStatusIcon("\070\105\110\100 \084\101\108\097\109\111\109"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\056\056")o:SetQuests({ActiveQuests={};CompletedQuests={["\070\105\110\100 \084\101\108\097\109\111\109"]=true}})o:AssertEquals(o.CuT:GetStatusIcon("\070\105\110\100 \084\101\108\097\109\111\109"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\057\048\051")o:AssertEquals(o.CuT:GetStatusIcon("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\051\052\051\054\057\050\048")o:SetQuests({ActiveQuests={["\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"]=true};CompletedQuests={}})o:AssertEquals(o.CuT:GetStatusIcon("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\054\051")o:SetInventory({PetCostumeHat="\080\101\116\067\097\116\067\111\115\116\117\109\101\072\097\116",PetCostumeCollar="\080\101\116\067\111\115\116\117\109\101\067\111\108\108\097\114";PetCostumeAnkle="\080\101\116\067\097\116\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertEquals(o.CuT:GetStatusIcon("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\054\051")o:SetInventory({PetCostumeHat="\080\101\116\067\097\116\067\111\115\116\117\109\101\072\097\116";PetCostumeCollar="\080\101\116\067\111\115\116\117\109\101\067\111\108\108\097\114",PetCostumeBack="\080\101\116\083\119\097\109\112\077\111\110\115\116\101\114\067\111\115\116\117\109\101\067\097\112\101",PetCostumeAnkle="\080\101\116\067\097\116\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertEquals(o.CuT:GetStatusIcon("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\054\051")o:SetInventory({PetCostumeHat="\080\101\116\067\097\116\067\111\115\116\117\109\101\072\097\116",PetCostumeCollar="\080\101\116\067\111\115\116\117\109\101\067\111\108\108\097\114";PetCostumeBack="\080\101\116\067\097\116\067\111\115\116\117\109\101\067\097\112\101";PetCostumeAnkle="\080\101\116\067\097\116\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertEquals(o.CuT:GetStatusIcon("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\056\056")o:SetQuests({ActiveQuests={};CompletedQuests={["\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"]=true}})o:AssertEquals(o.CuT:GetStatusIcon("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\057\048\051")o:AssertEquals(o.CuT:GetStatusIcon("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\051\052\051\054\057\050\048")o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true};CompletedQuests={}})o:AssertEquals(o.CuT:GetStatusIcon("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\054\051")o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true},CompletedQuests={};MonsterKillCounters={["\083\119\097\109\112 \087\111\108\102"]=4}})o:AssertEquals(o.CuT:GetStatusIcon("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\054\051")o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true},CompletedQuests={};MonsterKillCounters={["\083\119\097\109\112 \087\111\108\102"]=15}})o:AssertEquals(o.CuT:GetStatusIcon("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\056\056\056")o:SetQuests({ActiveQuests={};CompletedQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true}})o:AssertEquals(o.CuT:GetStatusIcon("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\114\098\120\097\115\115\101\116\105\100\058\047\047\049\051\050\056\056\049\057\048\051")end))o:RegisterUnitTest((C.new("\084\101\115\116\071\101\116\083\116\097\116\117\115\084\101\120\116")):SetRun(function(o)o:AssertEquals(o.CuT:GetStatusText("\077\101\099\104 \083\117\105\116"),"\078\111\116 \085\110\108\111\099\107\101\100")o:SetQuests({ActiveQuests={["\077\101\099\104 \083\117\105\116"]=true};CompletedQuests={}})o:AssertEquals(o.CuT:GetStatusText("\077\101\099\104 \083\117\105\116"),"\048\047\054 \066\108\097\099\107 \073\114\111\110 \073\110\103\111\116\115")o:SetInventory({"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116"})o:AssertEquals(o.CuT:GetStatusText("\077\101\099\104 \083\117\105\116"),"\051\047\054 \066\108\097\099\107 \073\114\111\110 \073\110\103\111\116\115")o:SetInventory({"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116";"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116"})o:AssertEquals(o.CuT:GetStatusText("\077\101\099\104 \083\117\105\116"),"\082\101\097\100\121 \116\111 \116\117\114\110 \105\110\033")o:SetInventory({"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116";"\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116","\066\108\097\099\107 \073\114\111\110 \073\110\103\111\116"})o:AssertEquals(o.CuT:GetStatusText("\077\101\099\104 \083\117\105\116"),"\082\101\097\100\121 \116\111 \116\117\114\110 \105\110\033")o:SetQuests({ActiveQuests={},CompletedQuests={["\077\101\099\104 \083\117\105\116"]=true}})o:AssertEquals(o.CuT:GetStatusText("\077\101\099\104 \083\117\105\116"),"\081\117\101\115\116 \067\111\109\112\108\101\116\101\033")o:AssertEquals(o.CuT:GetStatusText("\070\105\110\100 \084\101\108\097\109\111\109"),"\078\111\116 \085\110\108\111\099\107\101\100")o:SetQuests({ActiveQuests={["\070\105\110\100 \084\101\108\097\109\111\109"]=true};CompletedQuests={}})o:AssertEquals(o.CuT:GetStatusText("\070\105\110\100 \084\101\108\097\109\111\109"),"\070\105\110\100 \084\101\108\097\109\111\109")o:SetQuests({ActiveQuests={},CompletedQuests={["\070\105\110\100 \084\101\108\097\109\111\109"]=true}})o:AssertEquals(o.CuT:GetStatusText("\070\105\110\100 \084\101\108\097\109\111\109"),"\081\117\101\115\116 \067\111\109\112\108\101\116\101\033")o:AssertEquals(o.CuT:GetStatusText("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\078\111\116 \085\110\108\111\099\107\101\100")o:SetQuests({ActiveQuests={["\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"]=true};CompletedQuests={}})o:AssertEquals(o.CuT:GetStatusText("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\069\113\117\105\112 \116\104\101 \067\097\116 \067\111\109\112\097\110\105\111\110 \083\101\116")o:SetInventory({PetCostumeHat="\080\101\116\067\097\116\067\111\115\116\117\109\101\072\097\116",PetCostumeCollar="\080\101\116\067\111\115\116\117\109\101\067\111\108\108\097\114";PetCostumeAnkle="\080\101\116\067\097\116\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertEquals(o.CuT:GetStatusText("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\069\113\117\105\112 \116\104\101 \067\097\116 \067\111\109\112\097\110\105\111\110 \083\101\116")o:SetInventory({PetCostumeHat="\080\101\116\067\097\116\067\111\115\116\117\109\101\072\097\116";PetCostumeCollar="\080\101\116\067\111\115\116\117\109\101\067\111\108\108\097\114";PetCostumeBack="\080\101\116\083\119\097\109\112\077\111\110\115\116\101\114\067\111\115\116\117\109\101\067\097\112\101",PetCostumeAnkle="\080\101\116\067\097\116\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertEquals(o.CuT:GetStatusText("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\069\113\117\105\112 \116\104\101 \067\097\116 \067\111\109\112\097\110\105\111\110 \083\101\116")o:SetInventory({PetCostumeHat="\080\101\116\067\097\116\067\111\115\116\117\109\101\072\097\116";PetCostumeCollar="\080\101\116\067\111\115\116\117\109\101\067\111\108\108\097\114";PetCostumeBack="\080\101\116\067\097\116\067\111\115\116\117\109\101\067\097\112\101",PetCostumeAnkle="\080\101\116\067\097\116\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertEquals(o.CuT:GetStatusText("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\082\101\097\100\121 \116\111 \116\117\114\110 \105\110\033")o:SetQuests({ActiveQuests={};CompletedQuests={["\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"]=true}})o:AssertEquals(o.CuT:GetStatusText("\070\117\114\'-\111\099\105\111\117\115 \070\097\115\104\105\111\110"),"\081\117\101\115\116 \067\111\109\112\108\101\116\101\033")o:AssertEquals(o.CuT:GetStatusText("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\078\111\116 \085\110\108\111\099\107\101\100")o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true};CompletedQuests={}})o:AssertEquals(o.CuT:GetStatusText("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\048\047\049\053 \083\119\097\109\112 \087\111\108\118\101\115")o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true};CompletedQuests={};MonsterKillCounters={["\083\119\097\109\112 \087\111\108\102"]=4}})o:AssertEquals(o.CuT:GetStatusText("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\052\047\049\053 \083\119\097\109\112 \087\111\108\118\101\115")o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true},CompletedQuests={};MonsterKillCounters={["\083\119\097\109\112 \087\111\108\102"]=15}})o:AssertEquals(o.CuT:GetStatusText("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\082\101\097\100\121 \116\111 \116\117\114\110 \105\110\033")o:SetQuests({ActiveQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true};CompletedQuests={};MonsterKillCounters={["\083\119\097\109\112 \087\111\108\102"]=18}})o:AssertEquals(o.CuT:GetStatusText("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\082\101\097\100\121 \116\111 \116\117\114\110 \105\110\033")o:SetQuests({ActiveQuests={};CompletedQuests={["\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"]=true}})o:AssertEquals(o.CuT:GetStatusText("\065\116\116\097\099\107 \079\102 \084\104\101 \083\119\097\109\112\087\111\108\118\101\115"),"\081\117\101\115\116 \067\111\109\112\108\101\116\101\033")end))o:RegisterUnitTest((C.new("\084\101\115\116\068\105\097\108\111\103\079\114\100\101\114")):SetRun(function(o)o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\070\111\114\116\105\102\121\105\110\103\084\111\119\110\072\097\108\108\095\083\084\065\082\084")o:SetQuests({ActiveQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true},CompletedQuests={}})o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\070\111\114\116\105\102\121\105\110\103\084\111\119\110\072\097\108\108\095\077\073\068")o:SetInventory({"\079\108\100 \066\111\097\114\100","\079\108\100 \066\111\097\114\100","\079\108\100 \066\111\097\114\100"})o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\070\111\114\116\105\102\121\105\110\103\084\111\119\110\072\097\108\108\095\077\073\068")o:SetInventory({"\079\108\100 \066\111\097\114\100","\079\108\100 \066\111\097\114\100","\079\108\100 \066\111\097\114\100";"\079\108\100 \066\111\097\114\100"})o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\070\111\114\116\105\102\121\105\110\103\084\111\119\110\072\097\108\108\095\068\079\078\069")o:SetQuests({ActiveQuests={},CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true}})o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\070\114\097\122\122\108\101\100\074\105\109\095\083\084\065\082\084")o:SetQuests({ActiveQuests={["\070\114\097\122\122\108\101\100 \074\105\109"]=true},CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true}})o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\070\114\097\122\122\108\101\100\074\105\109\095\077\073\068")o:AssertDialog("\070\114\097\122\122\108\101\100 \067\108\101\114\107 \074\105\109","\070\114\097\122\122\108\101\100\067\108\101\114\107\074\105\109\095\070\114\097\122\122\108\101\100\074\105\109\095\067\072\069\067\075\085\080")o:SetQuests({ActiveQuests={},CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true;["\070\114\097\122\122\108\101\100 \074\105\109"]=true}})o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\084\104\101\066\101\103\105\110\110\105\110\103\095\083\084\065\082\084")o:SetQuests({ActiveQuests={["\084\104\101 \098\101\103\105\110\110\105\110\103\046\046\046"]=true};CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true,["\070\114\097\122\122\108\101\100 \074\105\109"]=true}})o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\084\104\101\066\101\103\105\110\110\105\110\103\095\077\073\068")o:SetInventory({PetCostumeHat="\080\101\116\083\107\101\108\101\116\111\110\067\111\115\116\117\109\101\072\097\116",PetCostumeCollar="\080\101\116\083\107\101\108\101\116\111\110\067\111\115\116\117\109\101\067\111\108\108\097\114",PetCostumeBack="\080\101\116\083\107\101\108\101\116\111\110\067\111\115\116\117\109\101\067\097\112\101";PetCostumeAnkle="\080\101\116\083\107\101\108\101\116\111\110\067\111\115\116\117\109\101\065\110\107\108\101\116"})o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\084\104\101\066\101\103\105\110\110\105\110\103\095\068\079\078\069")o:SetQuests({ActiveQuests={},CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true,["\070\114\097\122\122\108\101\100 \074\105\109"]=true,["\084\104\101 \098\101\103\105\110\110\105\110\103\046\046\046"]=true}})o:AssertDialog("\066\117\105\108\100\101\114\109\097\110","\066\117\105\108\100\101\114\109\097\110\095\065\076\076\095\068\079\078\069")end))o:RegisterUnitTest((C.new("\084\101\115\116\065\100\100\105\110\103\065\110\100\067\111\109\112\108\101\116\105\110\103\081\117\101\115\116\115")):SetRun(function(o)o.CuT:AddQuest("\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108")o:AssertEquals(o.CuT.QuestData,{SelectedQuest="\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108",ActiveQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true};CompletedQuests={},MonsterKillCounters={}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o.CuT:AddQuest("\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108")o:AssertEquals(o.CuT.QuestData,{SelectedQuest="\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108",ActiveQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true};CompletedQuests={},MonsterKillCounters={}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o.CuT:AddQuest("\067\108\101\097\110-\117\112 \067\114\101\119")o:AssertEquals(o.CuT.QuestData,{SelectedQuest="\067\108\101\097\110-\117\112 \067\114\101\119";ActiveQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true,["\067\108\101\097\110-\117\112 \067\114\101\119"]=true},CompletedQuests={};MonsterKillCounters={["\071\104\111\115\116 \083\112\105\100\101\114"]=0}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o.CuT:AddQuest("\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121")o:AssertEquals(o.CuT.QuestData,{SelectedQuest="\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121",ActiveQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true;["\067\108\101\097\110-\117\112 \067\114\101\119"]=true;["\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121"]=true};CompletedQuests={};MonsterKillCounters={["\071\104\111\115\116 \083\112\105\100\101\114"]=0,["\071\104\111\115\116 \087\111\108\102"]=0}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o.CuT:CompleteQuest("\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108")o:AssertEquals(o.CuT.QuestData,{SelectedQuest="\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121",ActiveQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true,["\067\108\101\097\110-\117\112 \067\114\101\119"]=true;["\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121"]=true};CompletedQuests={};MonsterKillCounters={["\071\104\111\115\116 \083\112\105\100\101\114"]=0,["\071\104\111\115\116 \087\111\108\102"]=0}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o:SetInventory({"\079\108\100 \066\111\097\114\100","\079\108\100 \066\111\097\114\100";"\079\108\100 \066\111\097\114\100";"\079\108\100 \066\111\097\114\100"})o.CuT:CompleteQuest("\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108")o:AssertEquals(o.CuT.QuestData,{SelectedQuest=o.CuT.QuestData.SelectedQuest;ActiveQuests={["\067\108\101\097\110-\117\112 \067\114\101\119"]=true,["\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121"]=true},CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true},MonsterKillCounters={["\071\104\111\115\116 \083\112\105\100\101\114"]=0;["\071\104\111\115\116 \087\111\108\102"]=0}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")for T=1,13,1 do o.CuT:RegisterMonsterKill("\071\104\111\115\116 \083\112\105\100\101\114")end for T=1,20,1 do o.CuT:RegisterMonsterKill("\071\104\111\115\116 \087\111\108\102")end o:AssertEquals(o.CuT.QuestData,{SelectedQuest=o.CuT.QuestData.SelectedQuest;ActiveQuests={["\067\108\101\097\110-\117\112 \067\114\101\119"]=true,["\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121"]=true},CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true};MonsterKillCounters={["\071\104\111\115\116 \083\112\105\100\101\114"]=13;["\071\104\111\115\116 \087\111\108\102"]=20}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o.CuT:SelectQuest("\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121")o:AssertEquals(o.CuT.QuestData,{SelectedQuest="\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121";ActiveQuests={["\067\108\101\097\110-\117\112 \067\114\101\119"]=true;["\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121"]=true},CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true},MonsterKillCounters={["\071\104\111\115\116 \083\112\105\100\101\114"]=13,["\071\104\111\115\116 \087\111\108\102"]=20}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o.CuT:SelectQuest("\067\108\101\097\110-\117\112 \067\114\101\119")o:AssertEquals(o.CuT.QuestData,{SelectedQuest="\067\108\101\097\110-\117\112 \067\114\101\119",ActiveQuests={["\067\108\101\097\110-\117\112 \067\114\101\119"]=true;["\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121"]=true},CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true},MonsterKillCounters={["\071\104\111\115\116 \083\112\105\100\101\114"]=13;["\071\104\111\115\116 \087\111\108\102"]=20}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o.CuT:SelectQuest("\067\108\101\097\110-\117\112 \067\114\101\119")o:AssertEquals(o.CuT.QuestData,{SelectedQuest="\067\108\101\097\110-\117\112 \067\114\101\119";ActiveQuests={["\067\108\101\097\110-\117\112 \067\114\101\119"]=true;["\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121"]=true},CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true},MonsterKillCounters={["\071\104\111\115\116 \083\112\105\100\101\114"]=13;["\071\104\111\115\116 \087\111\108\102"]=20}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o.CuT:CompleteQuest("\067\108\101\097\110-\117\112 \067\114\101\119")o:AssertEquals(o.CuT.QuestData,{SelectedQuest="\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121",ActiveQuests={["\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121"]=true};CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true;["\067\108\101\097\110-\117\112 \067\114\101\119"]=true},MonsterKillCounters={["\071\104\111\115\116 \087\111\108\102"]=20}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")o.CuT:CompleteQuest("\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121")o:AssertEquals(o.CuT.QuestData,{ActiveQuests={};CompletedQuests={["\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108"]=true;["\067\108\101\097\110-\117\112 \067\114\101\119"]=true;["\080\097\119-\105\110\111\114\109\097\108 \065\099\116\105\118\105\116\121"]=true};MonsterKillCounters={}},"\081\117\101\115\116 \100\097\116\097 \105\115 \105\110\118\097\108\105\100\046")end))return C
--[[
TheNexusAvenger

Tests the Quests class.
--]]

local NexusUnitTesting = require("NexusUnitTesting")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HttpService = game:GetService("HttpService")

local ReplicatedStorageProject = require(ReplicatedStorage:WaitForChild("Project"):WaitForChild("ReplicatedStorage"))
local Quests = ReplicatedStorageProject:GetResource("State.Quests")



--[[
Setups up the test.
--]]
local QuestsTest = NexusUnitTesting.UnitTest:Extend()
function QuestsTest:Setup()
    --Create the mock player.
    local MockPlayer = Instance.new("Folder")
    local PlayerData = Instance.new("Folder")
    PlayerData.Name = "PlayerData"
    PlayerData.Parent = MockPlayer
    local InventoryValue = Instance.new("StringValue")
    InventoryValue.Name = "Inventory"
    InventoryValue.Value = "[]"
    InventoryValue.Parent = PlayerData
    self.InventoryValue = InventoryValue
    local QuestsValue = Instance.new("StringValue")
    QuestsValue.Name = "Quests"
    QuestsValue.Value = "[]"
    QuestsValue.Parent = PlayerData
    self.QuestsValue = QuestsValue

    --Create the component under testing.
    self.CuT = Quests.GetQuests(MockPlayer)
end

--[[
Sets the inventory.
--]]
function QuestsTest:SetInventory(Items)
    --Create the table.
    local NewInventory = {}
    for i,Item in pairs(Items) do
        NewInventory[tostring(i)] = {Name=Item}
    end

    --Set the value.
    self.InventoryValue.Value = HttpService:JSONEncode(NewInventory)
end

--[[
Sets the quests.
--]]
function QuestsTest:SetQuests(Quests)
    self.QuestsValue.Value = HttpService:JSONEncode(Quests)
end

--[[
Asserts the dialog of an NPC.
--]]
function QuestsTest:AssertDialog(NPCName,DialogName)
    local Dialog = self.CuT:GetDialogForNPC(NPCName)
    if Dialog == nil then
        if DialogName ~= nil then
            self:Fail("No dialog was returned.")
        else
            return
        end
    end
    self:AssertEquals(Dialog.Name,DialogName,"Wrong dialog was returned.")
end

--[[
Tests quest conditions being valid.
--]]
NexusUnitTesting:RegisterUnitTest(QuestsTest.new("TestQuestConditonValid"):SetRun(function(self)
    --Test the conditions for an item quest.
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","NotUnlocked"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","TurnedIn"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit",{"AllItems","TurnedIn"}),false)
    self:SetQuests({ActiveQuests={["Mech Suit"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","Inventory"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","TurnedIn"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit",{"AllItems","TurnedIn"}),false)
    self:SetInventory({"Black Iron Ingot","Black Iron Ingot","Black Iron Ingot"})
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","Inventory"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","TurnedIn"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit",{"AllItems","TurnedIn"}),false)
    self:SetInventory({"Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot"})
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","AllItems"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","TurnedIn"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit",{"AllItems","TurnedIn"}),true)
    self:SetQuests({ActiveQuests={},CompletedQuests={["Mech Suit"] = true}})
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit","TurnedIn"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Mech Suit",{"AllItems","TurnedIn"}),true)

    --Test the conditions for an NPC quest.
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","NotUnlocked"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","TurnedIn"),false)
    self:SetQuests({ActiveQuests={["Find Telamom"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","Inventory"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","AllItems"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","TurnedIn"),false)
    self:SetQuests({ActiveQuests={},CompletedQuests={["Find Telamom"] = true}})
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Find Telamom","TurnedIn"),true)

    --Test the conditions for an Dressup quest.
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","NotUnlocked"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","TurnedIn"),false)
    self:SetQuests({ActiveQuests={["Fur'-ocious Fashion"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","Inventory"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","TurnedIn"),false)
    self:SetInventory({PetCostumeHat="PetCatCostumeHat",PetCostumeCollar="PetCostumeCollar",PetCostumeAnkle="PetCatCostumeAnklet"})
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","Inventory"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","TurnedIn"),false)
    self:SetInventory({PetCostumeHat="PetCatCostumeHat",PetCostumeCollar="PetCostumeCollar",PetCostumeBack="PetSwampMonsterCostumeCape",PetCostumeAnkle="PetCatCostumeAnklet"})
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","Inventory"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","TurnedIn"),false)
    self:SetInventory({PetCostumeHat="PetCatCostumeHat",PetCostumeCollar="PetCostumeCollar",PetCostumeBack="PetCatCostumeCape",PetCostumeAnkle="PetCatCostumeAnklet"})
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","AllItems"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","TurnedIn"),false)
    self:SetQuests({ActiveQuests={},CompletedQuests={["Fur'-ocious Fashion"] = true}})
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Fur'-ocious Fashion","TurnedIn"),true)

    --Test the conditions for an Monsters quest.
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","NotUnlocked"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","TurnedIn"),false)
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","Inventory"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","TurnedIn"),false)
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={},MonsterKillCounters={["Swamp Wolf"] = 4}})
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","Inventory"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","TurnedIn"),false)
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={},MonsterKillCounters={["Swamp Wolf"] = 15}})
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","AllItems"),true)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","TurnedIn"),false)
    self:SetQuests({ActiveQuests={},CompletedQuests={["Attack Of The SwampWolves"] = true}})
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","NotUnlocked"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","Inventory"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","AllItems"),false)
    self:AssertEquals(self.CuT:QuestConditonValid("Attack Of The SwampWolves","TurnedIn"),true)
end))

--[[
Test the GetStatusIcon method.
--]]
NexusUnitTesting:RegisterUnitTest(QuestsTest.new("TestGetStatusIcon"):SetRun(function(self)
    --Test the icons for an item quest.
    self:AssertEquals(self.CuT:GetStatusIcon("Mech Suit"),"rbxassetid://133436920")
    self:SetQuests({ActiveQuests={["Mech Suit"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:GetStatusIcon("Mech Suit"),"rbxassetid://132881863")
    self:SetInventory({"Black Iron Ingot","Black Iron Ingot","Black Iron Ingot"})
    self:AssertEquals(self.CuT:GetStatusIcon("Mech Suit"),"rbxassetid://132881863")
    self:SetInventory({"Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot"})
    self:AssertEquals(self.CuT:GetStatusIcon("Mech Suit"),"rbxassetid://132881888")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Mech Suit"] = true}})
    self:AssertEquals(self.CuT:GetStatusIcon("Mech Suit"),"rbxassetid://132881903")

    --Test the conditions for an NPC quest.
    self:AssertEquals(self.CuT:GetStatusIcon("Find Telamom"),"rbxassetid://133436920")
    self:SetQuests({ActiveQuests={["Find Telamom"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:GetStatusIcon("Find Telamom"),"rbxassetid://132881888")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Find Telamom"] = true}})
    self:AssertEquals(self.CuT:GetStatusIcon("Find Telamom"),"rbxassetid://132881903")

    --Test the conditions for an Dressup quest.
    self:AssertEquals(self.CuT:GetStatusIcon("Fur'-ocious Fashion"),"rbxassetid://133436920")
    self:SetQuests({ActiveQuests={["Fur'-ocious Fashion"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:GetStatusIcon("Fur'-ocious Fashion"),"rbxassetid://132881863")
    self:SetInventory({PetCostumeHat="PetCatCostumeHat",PetCostumeCollar="PetCostumeCollar",PetCostumeAnkle="PetCatCostumeAnklet"})
    self:AssertEquals(self.CuT:GetStatusIcon("Fur'-ocious Fashion"),"rbxassetid://132881863")
    self:SetInventory({PetCostumeHat="PetCatCostumeHat",PetCostumeCollar="PetCostumeCollar",PetCostumeBack="PetSwampMonsterCostumeCape",PetCostumeAnkle="PetCatCostumeAnklet"})
    self:AssertEquals(self.CuT:GetStatusIcon("Fur'-ocious Fashion"),"rbxassetid://132881863")
    self:SetInventory({PetCostumeHat="PetCatCostumeHat",PetCostumeCollar="PetCostumeCollar",PetCostumeBack="PetCatCostumeCape",PetCostumeAnkle="PetCatCostumeAnklet"})
    self:AssertEquals(self.CuT:GetStatusIcon("Fur'-ocious Fashion"),"rbxassetid://132881888")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Fur'-ocious Fashion"] = true}})
    self:AssertEquals(self.CuT:GetStatusIcon("Fur'-ocious Fashion"),"rbxassetid://132881903")

    --Test the conditions for an Monsters quest.
    self:AssertEquals(self.CuT:GetStatusIcon("Attack Of The SwampWolves"),"rbxassetid://133436920")
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:GetStatusIcon("Attack Of The SwampWolves"),"rbxassetid://132881863")
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={},MonsterKillCounters={["Swamp Wolf"] = 4}})
    self:AssertEquals(self.CuT:GetStatusIcon("Attack Of The SwampWolves"),"rbxassetid://132881863")
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={},MonsterKillCounters={["Swamp Wolf"] = 15}})
    self:AssertEquals(self.CuT:GetStatusIcon("Attack Of The SwampWolves"),"rbxassetid://132881888")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Attack Of The SwampWolves"] = true}})
    self:AssertEquals(self.CuT:GetStatusIcon("Attack Of The SwampWolves"),"rbxassetid://132881903")
end))

--[[
Test the GetStatusText method.
--]]
NexusUnitTesting:RegisterUnitTest(QuestsTest.new("TestGetStatusText"):SetRun(function(self)
    --Test the icons for an item quest.
    self:AssertEquals(self.CuT:GetStatusText("Mech Suit"),"Not Unlocked")
    self:SetQuests({ActiveQuests={["Mech Suit"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:GetStatusText("Mech Suit"),"0/6 Black Iron Ingots")
    self:SetInventory({"Black Iron Ingot","Black Iron Ingot","Black Iron Ingot"})
    self:AssertEquals(self.CuT:GetStatusText("Mech Suit"),"3/6 Black Iron Ingots")
    self:SetInventory({"Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot"})
    self:AssertEquals(self.CuT:GetStatusText("Mech Suit"),"Ready to turn in!")
    self:SetInventory({"Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot","Black Iron Ingot"})
    self:AssertEquals(self.CuT:GetStatusText("Mech Suit"),"Ready to turn in!")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Mech Suit"] = true}})
    self:AssertEquals(self.CuT:GetStatusText("Mech Suit"),"Quest Complete!")

    --Test the conditions for an NPC quest.
    self:AssertEquals(self.CuT:GetStatusText("Find Telamom"),"Not Unlocked")
    self:SetQuests({ActiveQuests={["Find Telamom"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:GetStatusText("Find Telamom"),"Find Telamom")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Find Telamom"] = true}})
    self:AssertEquals(self.CuT:GetStatusText("Find Telamom"),"Quest Complete!")

    --Test the conditions for an Dressup quest.
    self:AssertEquals(self.CuT:GetStatusText("Fur'-ocious Fashion"),"Not Unlocked")
    self:SetQuests({ActiveQuests={["Fur'-ocious Fashion"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:GetStatusText("Fur'-ocious Fashion"),"Equip the Cat Companion Set")
    self:SetInventory({PetCostumeHat="PetCatCostumeHat",PetCostumeCollar="PetCostumeCollar",PetCostumeAnkle="PetCatCostumeAnklet"})
    self:AssertEquals(self.CuT:GetStatusText("Fur'-ocious Fashion"),"Equip the Cat Companion Set")
    self:SetInventory({PetCostumeHat="PetCatCostumeHat",PetCostumeCollar="PetCostumeCollar",PetCostumeBack="PetSwampMonsterCostumeCape",PetCostumeAnkle="PetCatCostumeAnklet"})
    self:AssertEquals(self.CuT:GetStatusText("Fur'-ocious Fashion"),"Equip the Cat Companion Set")
    self:SetInventory({PetCostumeHat="PetCatCostumeHat",PetCostumeCollar="PetCostumeCollar",PetCostumeBack="PetCatCostumeCape",PetCostumeAnkle="PetCatCostumeAnklet"})
    self:AssertEquals(self.CuT:GetStatusText("Fur'-ocious Fashion"),"Ready to turn in!")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Fur'-ocious Fashion"] = true}})
    self:AssertEquals(self.CuT:GetStatusText("Fur'-ocious Fashion"),"Quest Complete!")

    --Test the conditions for an Monsters quest.
    self:AssertEquals(self.CuT:GetStatusText("Attack Of The SwampWolves"),"Not Unlocked")
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={}})
    self:AssertEquals(self.CuT:GetStatusText("Attack Of The SwampWolves"),"0/15 Swamp Wolves")
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={},MonsterKillCounters={["Swamp Wolf"] = 4}})
    self:AssertEquals(self.CuT:GetStatusText("Attack Of The SwampWolves"),"4/15 Swamp Wolves")
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={},MonsterKillCounters={["Swamp Wolf"] = 15}})
    self:AssertEquals(self.CuT:GetStatusText("Attack Of The SwampWolves"),"Ready to turn in!")
    self:SetQuests({ActiveQuests={["Attack Of The SwampWolves"] = true},CompletedQuests={},MonsterKillCounters={["Swamp Wolf"] = 18}})
    self:AssertEquals(self.CuT:GetStatusText("Attack Of The SwampWolves"),"Ready to turn in!")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Attack Of The SwampWolves"] = true}})
    self:AssertEquals(self.CuT:GetStatusText("Attack Of The SwampWolves"),"Quest Complete!")
end))

--[[
Tests the dialogs data order as a base test. The full
quests flow is covered by other tests.
--]]
NexusUnitTesting:RegisterUnitTest(QuestsTest.new("TestDialogOrder"):SetRun(function(self)
    self:AssertDialog("Builderman","Builderman_FortifyingTownHall_START")
    self:SetQuests({ActiveQuests={["Fortifying Town Hall"] = true},CompletedQuests={}})
    self:AssertDialog("Builderman","Builderman_FortifyingTownHall_MID")
    self:SetInventory({"Old Board","Old Board","Old Board"})
    self:AssertDialog("Builderman","Builderman_FortifyingTownHall_MID")
    self:SetInventory({"Old Board","Old Board","Old Board","Old Board"})
    self:AssertDialog("Builderman","Builderman_FortifyingTownHall_DONE")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Fortifying Town Hall"] = true}})
    self:AssertDialog("Builderman","Builderman_FrazzledJim_START")
    self:SetQuests({ActiveQuests={["Frazzled Jim"] = true},CompletedQuests={["Fortifying Town Hall"] = true}})
    self:AssertDialog("Builderman","Builderman_FrazzledJim_MID")
    self:AssertDialog("Frazzled Clerk Jim","FrazzledClerkJim_FrazzledJim_CHECKUP")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Fortifying Town Hall"] = true,["Frazzled Jim"] = true}})
    self:AssertDialog("Builderman","Builderman_TheBeginning_START")
    self:SetQuests({ActiveQuests={["The beginning..."] = true},CompletedQuests={["Fortifying Town Hall"] = true,["Frazzled Jim"] = true}})
    self:AssertDialog("Builderman","Builderman_TheBeginning_MID")
    self:SetInventory({PetCostumeHat="PetSkeletonCostumeHat",PetCostumeCollar="PetSkeletonCostumeCollar",PetCostumeBack="PetSkeletonCostumeCape",PetCostumeAnkle="PetSkeletonCostumeAnklet"})
    self:AssertDialog("Builderman","Builderman_TheBeginning_DONE")
    self:SetQuests({ActiveQuests={},CompletedQuests={["Fortifying Town Hall"] = true,["Frazzled Jim"] = true,["The beginning..."] = true}})
    self:AssertDialog("Builderman","Builderman_ALL_DONE")
end))

--[[
Tests adding and completing quests.
--]]
NexusUnitTesting:RegisterUnitTest(QuestsTest.new("TestAddingAndCompletingQuests"):SetRun(function(self)
    --Assert quests are added correctly.
    self.CuT:AddQuest("Fortifying Town Hall")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest="Fortifying Town Hall",ActiveQuests={["Fortifying Town Hall"] = true},CompletedQuests={},MonsterKillCounters={}},"Quest data is invalid.")
    self.CuT:AddQuest("Fortifying Town Hall")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest="Fortifying Town Hall",ActiveQuests={["Fortifying Town Hall"] = true},CompletedQuests={},MonsterKillCounters={}},"Quest data is invalid.")
    self.CuT:AddQuest("Clean-up Crew")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest="Clean-up Crew",ActiveQuests={["Fortifying Town Hall"] = true,["Clean-up Crew"] = true},CompletedQuests={},MonsterKillCounters={["Ghost Spider"] = 0}},"Quest data is invalid.")
    self.CuT:AddQuest("Paw-inormal Activity")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest="Paw-inormal Activity",ActiveQuests={["Fortifying Town Hall"] = true,["Clean-up Crew"] = true,["Paw-inormal Activity"] = true},CompletedQuests={},MonsterKillCounters={["Ghost Spider"] = 0,["Ghost Wolf"] = 0}},"Quest data is invalid.")

    --Assert quests are completed correctly.
    self.CuT:CompleteQuest("Fortifying Town Hall")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest="Paw-inormal Activity",ActiveQuests={["Fortifying Town Hall"] = true,["Clean-up Crew"] = true,["Paw-inormal Activity"] = true},CompletedQuests={},MonsterKillCounters={["Ghost Spider"] = 0,["Ghost Wolf"] = 0}},"Quest data is invalid.")
    self:SetInventory({"Old Board","Old Board","Old Board","Old Board"})
    self.CuT:CompleteQuest("Fortifying Town Hall")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest=self.CuT.QuestData.SelectedQuest,ActiveQuests={["Clean-up Crew"] = true,["Paw-inormal Activity"] = true},CompletedQuests={["Fortifying Town Hall"] = true},MonsterKillCounters={["Ghost Spider"] = 0,["Ghost Wolf"] = 0}},"Quest data is invalid.")
    for i = 1,13 do
        self.CuT:RegisterMonsterKill("Ghost Spider")
    end
    for i = 1,20 do
        self.CuT:RegisterMonsterKill("Ghost Wolf")
    end
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest=self.CuT.QuestData.SelectedQuest,ActiveQuests={["Clean-up Crew"] = true,["Paw-inormal Activity"] = true},CompletedQuests={["Fortifying Town Hall"] = true},MonsterKillCounters={["Ghost Spider"] = 13,["Ghost Wolf"] = 20}},"Quest data is invalid.")
    self.CuT:SelectQuest("Paw-inormal Activity")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest="Paw-inormal Activity",ActiveQuests={["Clean-up Crew"] = true,["Paw-inormal Activity"] = true},CompletedQuests={["Fortifying Town Hall"] = true},MonsterKillCounters={["Ghost Spider"] = 13,["Ghost Wolf"] = 20}},"Quest data is invalid.")
    self.CuT:SelectQuest("Clean-up Crew")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest="Clean-up Crew",ActiveQuests={["Clean-up Crew"] = true,["Paw-inormal Activity"] = true},CompletedQuests={["Fortifying Town Hall"] = true},MonsterKillCounters={["Ghost Spider"] = 13,["Ghost Wolf"] = 20}},"Quest data is invalid.")
    self.CuT:SelectQuest("Clean-up Crew")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest="Clean-up Crew",ActiveQuests={["Clean-up Crew"] = true,["Paw-inormal Activity"] = true},CompletedQuests={["Fortifying Town Hall"] = true},MonsterKillCounters={["Ghost Spider"] = 13,["Ghost Wolf"] = 20}},"Quest data is invalid.")
    self.CuT:CompleteQuest("Clean-up Crew")
    self:AssertEquals(self.CuT.QuestData,{SelectedQuest="Paw-inormal Activity",ActiveQuests={["Paw-inormal Activity"] = true},CompletedQuests={["Fortifying Town Hall"] = true,["Clean-up Crew"] = true},MonsterKillCounters={["Ghost Wolf"] = 20}},"Quest data is invalid.")
    self.CuT:CompleteQuest("Paw-inormal Activity")
    self:AssertEquals(self.CuT.QuestData,{ActiveQuests={},CompletedQuests={["Fortifying Town Hall"] = true,["Clean-up Crew"] = true,["Paw-inormal Activity"] = true},MonsterKillCounters={}},"Quest data is invalid.")
end))



--Return the quests class so it can be used by sub-modules.
return QuestsTest