annotate Tests.lua @ 8:34078dfcc67c

syntax fix
author wobin
date Sun, 19 Apr 2009 02:49:29 +1000
parents d19385c4a282
children 2231fd3f139b
rev   line source
wobin@3 1 -- Tests for Squawk
wobin@3 2
wobin@3 3 if not Squawk then return end
wobin@3 4
wobin@3 5 --[[
wobin@3 6 --Tests we need to do:
wobin@3 7 --
wobin@4 8 -- Add a follower
wobin@4 9 -- Remove a follower
wobin@4 10 -- Request to follow someone
wobin@4 11 -- Recieve a request from a follower
wobin@4 12 -- Send a Squawk
wobin@4 13 -- Recieve a direct Squawk
wobin@4 14 -- Send a Squawk to the Guild
wobin@4 15 -- Recieve a Squawk from the Guild
wobin@3 16 --]]
wobin@4 17 --
wobin@4 18
wobin@4 19 SquawkTester = LibStub("AceAddon-3.0", "AceComm-3.0", "AceConsole-3.0")
wobin@4 20
wobin@4 21 local Test = SquawkTester
wobin@4 22
wobin@4 23 function Test:OnInitialize()
wobin@4 24 self:RegisterComm("Squawk", ReceiveMessage)
wobin@4 25 self:RegisterSlashCommand("TestSquawk", "RunTests")
wobin@4 26 end
wobin@4 27
wobin@4 28 function Test:RunTests()
wobin@7 29 AddPublicFollower()
wobin@7 30 RemovePublicFollower()
wobin@7 31 AddPrivateFollower()
wobin@7 32 ApprovePendingRequest()
wobin@4 33 end
wobin@4 34
wobin@7 35 function Test:AddPublicFollower()
wobin@7 36 Squawk.Settings.Private = false
wobin@7 37 Squawk.Controller:IWantToFollowThem(UnitName("player"))
wobin@7 38 end
wobin@7 39
wobin@7 40 function Test:RemovePublicFollower()
wobin@7 41 Squawk.Controller:IWantToUnfollowThem(UnitName("player"))
wobin@7 42 end
wobin@7 43
wobin@7 44 function Test:AddPrivateFollower()
wobin@7 45 Squawk.Settings.Private = true
wobin@7 46 Squawk.Controller:IWantToFollowThem(UnitName("player"))
wobin@7 47 end
wobin@7 48
wobin@7 49 function Test:ApprovePendingRequest()
wobin@7 50 Squawk.Controller:ApprovePendingRequest(Name)
wobin@4 51 end
wobin@4 52
wobin@4 53 function Test:ReceiveMessage(Prefix, Message, Distribution, Sender)
wobin@4 54 end
wobin@4 55
wobin@4 56 function Test:SendMessageDirectly(Message)
wobin@4 57
wobin@4 58 end