Mercurial > wow > squawk
view Tests.lua @ 22:8df5d8ef2e27 tip
switch back to LibQTip-1.0 as LQTC is depreciated
Fixed up the line resizing as LQT does this automatically now
author | wobin |
---|---|
date | Wed, 22 Jul 2009 23:16:42 +1000 |
parents | 2231fd3f139b |
children |
line wrap: on
line source
-- Tests for Squawk if not Squawk then return end --[[ --Tests we need to do: -- -- Add a follower -- Remove a follower -- Request to follow someone -- Recieve a request from a follower -- Send a Squawk -- Recieve a direct Squawk -- Send a Squawk to the Guild -- Recieve a Squawk from the Guild --]] -- SquawkTester = LibStub("AceAddon-3.0"):NewAddon("SquawkTester", "AceComm-3.0", "AceConsole-3.0") local Test = SquawkTester local Controller = Squawk.Controller local Settings = Squawk.Model.UserSettings function Test:OnInitialize() self:RegisterComm("Squawk", "ReceiveMessage") self:RegisterChatCommand("TS", "RunTests") self:Print("Initialising Tester") self.Tests = { ["a"] = SquawkTester.AddPublicFollower, ["b"] = SquawkTester.RemovePublicFollower, ["c"] = SquawkTester.AddPrivateFollower, ["d"] = SquawkTester.ApprovePendingRequest } end function Test:RunTests(TestNumber) self:Print(TestNumber) self.Tests[TestNumber](Test) end function Test:AddPublicFollower() Settings:TogglePrivate() Controller:IWantToFollowThem(UnitName("player")) end function Test:RemovePublicFollower() Controller:IWantToUnfollowThem(UnitName("player")) end function Test:AddPrivateFollower() Settings:TogglePrivate() Controller:IWantToFollowThem(UnitName("player")) end function Test:ApprovePendingRequest() Controller:ApprovePendingRequest(UnitName("player")) end function Test:ReceiveMessage(Prefix, Message, Distribution, Sender) end function Test:SendMessageDirectly(Message) end