public AgileBoard GetAgileBoard(Int32 agileBoardID) { AgileBoard board = GetAgileBoards().Where(b => b.ID == agileBoardID).FirstOrDefault(); if (board == null) { throw new Exception(String.Format("The board with ID {0} does not exist", agileBoardID)); } return board; }
public AgileBoard GetAgileBoard(int agileBoardID) { if (null == _agileBoards) { GetAgileBoards(); } AgileBoard board = _agileBoards.Where(b => b.ID == agileBoardID).FirstOrDefault(); if (board == null) { throw new Exception(string.Format("The board with ID {0} does not exist", agileBoardID)); } return(board); }
public void GetSprintsFromAgileBoardTest() { Jira environment = new Jira(); environment.Connect(new MockJiraClient()); AgileBoard agileboard = environment.GetAgileBoards().First(); Assert.Equal(1, agileboard.ID); List <Sprint> sprints = agileboard.GetSprints(); Assert.NotNull(sprints); Assert.Equal(3, sprints.Count); }
public void GetIssuesFromSprintTest() { Jira environment = new Jira(); environment.Connect(new MockJiraClient()); //Get the first agile board AgileBoard agileboard = environment.GetAgileBoards().First(); Assert.Equal(1, agileboard.ID); //Get the first sprint from the first agile board Sprint sprint = agileboard.GetSprints().First(); Assert.Equal(1, sprint.ID); List <Issue> issues = sprint.GetIssues(); Assert.NotNull(issues); Assert.Equal(4, issues.Count); }
public void GetIssuesFromSprintTest() { Jira environment = new Jira(); environment.Connect(new MockJiraClient()); //Get the first agile board AgileBoard agileboard = environment.GetAgileBoards().First(); Assert.Equal(1, agileboard.ID); //Get the first sprint from the first agile board List <Sprint> sprints = agileboard.GetSprints(); Assert.Equal(3, sprints.Count); //Get a sprint and try to select an issue. Sprint sprint = sprints.Where(s => s.ID == 1).First(); List <Issue> issues = sprint.GetIssues(); Assert.NotNull(issues); Assert.Equal(4, issues.Count); }