public void Example_of_using_api_AddCard() { //Adds a Card with the specified values into the specified Lane. //prerequisites (records with specified ids must exist in db) var dto = new CardItem { Id = 0, Title = "Test Card", TypeId = 1, Size = 12, AssignedUserId = 0, IsBlocked = false }; //Example of output (output would be quite long, since it returns all board infrastructure for re-rendering) //{"ReplyCode":201,"ReplyText":"The Card was successfully added.","ReplyData":[{"Id":1,"Title":"Realistic Board","Description":"","Version":11,"Active":false,"OrganizationId":1,"Lanes":[{"Id":3,"Active":true,"Title":"Work Queue","Description":"","CardLimit":15,"ClassType":0,"Width":3,"Version":23,"Cards":[{"Id":1,"LaneId":0,"Title":"aaa","Description":"","ClassType":0,"TypeName":"Feature","Size":0,"Active":false,"Color":"Green","Version":9,"AssignedUserId":1,"IsBlocked":false}],"UserSubscription":0},{"Id":4,"Active":true,"Title":"Design","Description":"","CardLimit":3,"ClassType":0,"Width":1,"Version":23,"Cards":[{"Id":4,"LaneId":0,"Title":"Test Card","Description":"","ClassType":0,"TypeName":"Feature","Size":12,"Active":false,"Color":"Green","Version":1,"AssignedUserId":0,"IsBlocked":false},{"Id":2,"LaneId":0,"Title":"bbb","Description":"","ClassType":2,"TypeName":"Defect","Size":0,"Active":false,"Color":"Red","Version":11,"AssignedUserId":1,"IsBlocked":false}],"UserSubscription":0},{"Id":5,"Active":true,"Title":"Doing","Description":"","CardLimit":2,"ClassType":0,"Width":1,"Version":23,"Cards":[{"Id":3,"LaneId":0,"Title":"cccc","Description":"<p>asdasd</p>","ClassType":0,"TypeName":"Feature","Size":12,"Active":false,"Color":"Green","Version":1,"AssignedUserId":0,"IsBlocked":false}],"UserSubscription":0},{"Id":6,"Active":true,"Title":"Code Review","Description":"","CardLimit":4,"ClassType":0,"Width":1,"Version":23,"Cards":[],"UserSubscription":0},{"Id":7,"Active":true,"Title":"QA Test","Description":"","CardLimit":3,"ClassType":0,"Width":1,"Version":23,"Cards":[],"UserSubscription":0},{"Id":8,"Active":true,"Title":"Deploy Queue","Description":"","CardLimit":6,"ClassType":0,"Width":2,"Version":23,"Cards":[],"UserSubscription":0},{"Id":9,"Active":true,"Title":"Done","Description":"","CardLimit":15,"ClassType":0,"Width":3,"Version":23,"Cards":[],"UserSubscription":0}],"BoardUsers":[{"Id":1,"FullName":"root root","EmailAddress":"*****@*****.**"}],"Backlog":{"Id":1,"Active":false,"Title":"Backlog","Description":"","CardLimit":0,"ClassType":1,"Width":1,"Version":23,"Cards":[],"UserSubscription":0},"Archive":{"Id":2,"Active":false,"Title":"Archive","Description":"","CardLimit":0,"ClassType":2,"Width":1,"Version":23,"Cards":[],"UserSubscription":0},"UserSubscription":0}]} var output = _caller.AddCard(_data.BoardId.ToString(), _data.LaneId.ToString(), dto); Assert.That(output.Contains("The Card was successfully added.")); }
public void Example_of_using_api_UpdateCard() { //Updates the Cards properties with the provided values. //prerequisites (records with specified ids must exist in db) var dto = new CardItem { Id = 5, Title = "Updated Card Title", TypeId = 3 }; var output = _caller.UpdateCard(_data.BoardId.ToString(), _data.LaneId.ToString(), dto); Assert.That(output.Contains("The Card was successfully updated.")); }