作りました。
contrib/BTS.Trac - Shibuya.trac Wiki - Shibuya.trac - OSDN
#一応、週末の勉強会にあわせてもう一つか二つネタを出そうかと
こんなカンジで使えます
チケットの作成と取得
public void チケットの作成と取得() { Trac.Connect( Url, UserName, Password ); Ticket newTicket = new Ticket(); newTicket.Summary = "XML-RPC から登録"; newTicket.Description = "登録だよん"; newTicket.Create(); Ticket ticket = new Ticket(); ticket.Get( newTicket.ID ); Assert.AreEqual( ticket.ID, newTicket.ID ); Assert.AreEqual( ticket.Summary, newTicket.Summary ); Assert.AreEqual( ticket.Description, newTicket.Description ); }
チケット数の取得
public void チケット数の取得() { Trac.Connect( Url, UserName, Password ); int[] ticketsPoint1 = Ticket.Query( "status!=closed" ); Ticket newTicket1 = new Ticket(); newTicket1.Summary = "XML_Trac.rpc から登録1"; newTicket1.Description = "登録だよん1"; newTicket1.Create(); int[] ticketsPoint2 = Ticket.Query( "status!=closed" ); Assert.AreEqual( ticketsPoint1.Length + 1, ticketsPoint2.Length ); Ticket newTicket2 = new Ticket(); newTicket2.Summary = "XML_Trac.rpc から登録1"; newTicket2.Description = "登録だよん1"; newTicket2.Create(); int[] ticketsPoint3 = Ticket.Query( "status!=closed" ); Assert.AreEqual( ticketsPoint1.Length + 2, ticketsPoint3.Length ); }