protected override void OnArrange()
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<List<GitHubPulls.Pull>>();

			var pull1 = new GitHubPulls.Pull()
			{
				Id = 1,
				Number = 1,
				State = "Open",
				Body = "New Pull 1",
				Title = "New Pull 1"
			};

			var pull2 = new GitHubPulls.Pull()
			{
				Id = 2,
				Number = 2,
				State = "Open",
				Body = "New Pull 2",
				Title = "New Pull 2"
			};

			var pull3 = new GitHubPulls.Pull()
			{
				Id = 3,
				Number = 3,
				State = "Open",
				Body = "New Pull 3",
				Title = "New Pull 3"
			};

			var restResponse1 = new RestResponse()
			{
				Content = serializer.SerializeToString(new List<GitHubPulls.Pull>() {pull1}),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/1/pulls") && y.Method == Method.GET)))
				.Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(1, It.IsAny<string>())).Returns((Card) null);
			MockLeanKitApi.Setup(x => x.AddCard(1, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/2/pulls") && y.Method == Method.GET)))
				.Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(2, It.IsAny<string>())).Returns((Card) null);
			MockLeanKitApi.Setup(x => x.AddCard(2, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			var restResponse3 = new RestResponse()
			{
				Content = serializer.SerializeToString(new List<GitHubPulls.Pull>() {pull1, pull2, pull3}),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/3/pulls") && y.Method == Method.GET)))
				.Returns(restResponse3);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(3, It.IsAny<string>())).Returns((Card) null);
			MockLeanKitApi.Setup(x => x.AddCard(3, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/4/pulls") && y.Method == Method.GET)))
				.Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(4, It.IsAny<string>()))
				.Returns(new Card() {Id = 4, ExternalSystemName = "GitHub"});
			MockLeanKitApi.Setup(x => x.AddCard(4, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/5/pulls") && y.Method == Method.GET)))
				.Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(5, It.IsAny<string>()))
				.Returns(new Card() {Id = 5, ExternalSystemName = "GitHubber"});
			MockLeanKitApi.Setup(x => x.AddCard(5, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);
		}
		protected override void OnArrange()
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<GitHubPulls.Pull>();

			var pull1 = new GitHubPulls.Pull()
			{
				Id = 1,
				Number = 1,
				Title = "Pull 1",
				Body = "Pull 1",
				State = "Open"
			};

			var restResponse1 = new RestResponse()
			{
				Content = serializer.SerializeToString(pull1),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/1") && y.Method == Method.GET)))
				.Returns(restResponse1);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/1") && y.Method == Method.PATCH)))
				.Returns(restResponse1);

			var pull2 = new GitHubPulls.Pull()
			{
				Id = 2,
				Number = 2,
				Title = "Pull 2",
				Body = "Pull 2",
				State = "Open"
			};

			var restResponse2 = new RestResponse()
			{
				Content = serializer.SerializeToString(pull2),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/2") && y.Method == Method.GET)))
				.Returns(restResponse2);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/2") && y.Method == Method.PATCH)))
				.Returns(restResponse2);

			var pull3 = new GitHubPulls.Pull()
			{
				Id = 3,
				Number = 3,
				Title = "Pull 3",
				Body = "Pull 3",
				State = "Open"
			};

			var restResponse3 = new RestResponse()
			{
				Content = serializer.SerializeToString(pull3),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/3") && y.Method == Method.GET)))
				.Returns(restResponse3);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/3") && y.Method == Method.PATCH)))
				.Returns(restResponse3);

			var pull4 = new GitHubPulls.Pull()
			{
				Id = 4,
				Number = 4,
				Title = "Pull 4",
				Body = "Pull 4",
				State = "Open"
			};

			var restResponse4 = new RestResponse()
			{
				Content = serializer.SerializeToString(pull4),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/4") && y.Method == Method.GET)))
				.Returns(restResponse4);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/4") && y.Method == Method.PATCH)))
				.Returns(restResponse4);
		}
		protected override void OnArrange()
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<GitHubPulls.Pull>();

			var pull1 = new GitHubPulls.Pull()
			{
				Id = 1,
				Number = 1,
				State = "Open"
			};

			var restResponse1 = new RestResponse()
			{
				Content = serializer.SerializeToString(pull1),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/1") && y.Method == Method.GET)))
				.Returns(restResponse1);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/1") && y.Method == Method.PATCH)))
				.Returns(restResponse1);

			var pull2 = new GitHubPulls.Pull()
			{
				Id = 2,
				Number = 2,
				State = "Closed"
			};

			var restResponse2 = new RestResponse()
			{
				Content = serializer.SerializeToString(pull2),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/2") && y.Method == Method.GET)))
				.Returns(restResponse2);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/2") && y.Method == Method.PATCH)))
				.Returns(restResponse2);

			var errorSerializer = new JsonSerializer<GitHubPulls.ErrorMessage>();
			var errorResponse = new RestResponse()
			{
				Content = errorSerializer.SerializeToString(new GitHubPulls.ErrorMessage() {Message = "Error"}),
				StatusCode = HttpStatusCode.NotFound
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/3") && y.Method == Method.GET)))
				.Returns(errorResponse);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("pulls/3") && y.Method == Method.PATCH)))
				.Returns(errorResponse);
		}
		protected override void OnArrange() 
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<Unfuddle.Ticket>();

			var ticket1 = new Unfuddle.Ticket()
			{
				Id = 1,
				Status = "Open"
			};

			var restResponse1 = new RestResponse() { Content = serializer.SerializeToString(ticket1), StatusCode = HttpStatusCode.OK };

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/1") && y.Method == Method.GET))).Returns(restResponse1);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/1") && y.Method == Method.PUT))).Returns(restResponse1);

			var ticket2 = new Unfuddle.Ticket()
			{
				Id = 2,
				Status = "Accepted"
			};

			var restResponse2 = new RestResponse() { Content = serializer.SerializeToString(ticket2), StatusCode = HttpStatusCode.OK };

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/2") && y.Method == Method.GET))).Returns(restResponse2);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/2") && y.Method == Method.PUT))).Returns(restResponse2);

			var ticket3 = new Unfuddle.Ticket()
			{
				Id = 3,
				Status = "Open"
			};

			var restResponse3 = new RestResponse() { Content = serializer.SerializeToString(ticket3), StatusCode = HttpStatusCode.OK };

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/3") && y.Method == Method.GET))).Returns(restResponse3);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/3") && y.Method == Method.PUT))).Returns(restResponse3);

			var ticket4 = new Unfuddle.Ticket()
			{
				Id = 4,
				Status = "Resolved"
			};

			var restResponse4 = new RestResponse() { Content = serializer.SerializeToString(ticket4), StatusCode = HttpStatusCode.OK };

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/4") && y.Method == Method.GET))).Returns(restResponse4);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/4") && y.Method == Method.PUT))).Returns(restResponse4);
		}
		protected override void OnArrange() 
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<Unfuddle.TicketsResponse>();

			var ticket1 = new Unfuddle.Ticket()
			{
				Id = 1,
				Status = "Open",
				Description = "Ticket 1",
				Summary = "Ticket 1"
			};

			var ticket2 = new Unfuddle.Ticket()
			{
				Id = 2,
				Status = "Open",
				Description = "Ticket 2",
				Summary = "Ticket 2"
			};

			var ticket3 = new Unfuddle.Ticket()
			{
				Id = 3,
				Status = "Open",
				Description = "Ticket 3",
				Summary = "Ticket 3"
			};

			var group1 = new Unfuddle.Group()
				{
					Tickets = new List<Unfuddle.Ticket>() {ticket1}
				};

			var unfuddleResponse1 = new Unfuddle.TicketsResponse()
				{
					Count = 1,
					Groups = new List<Unfuddle.Group>() {group1}
				};

			var restResponse1 = new RestResponse()
			{
				Content = serializer.SerializeToString(unfuddleResponse1),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("projects/1/ticket_reports") && y.Method == Method.GET))).Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(1, It.IsAny<string>())).Returns((Card)null);
			MockLeanKitApi.Setup(x => x.AddCard(1, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("projects/2/ticket_reports") && y.Method == Method.GET))).Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(2, It.IsAny<string>())).Returns((Card)null);
			MockLeanKitApi.Setup(x => x.AddCard(2, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			var group3 = new Unfuddle.Group()
			{
				Tickets = new List<Unfuddle.Ticket>() { ticket1, ticket2, ticket3 }
			};

			var unfuddleResponse3 = new Unfuddle.TicketsResponse()
			{
				Count = 1,
				Groups = new List<Unfuddle.Group>() { group3 }
			};

			var restResponse3 = new RestResponse()
			{
				Content = serializer.SerializeToString(unfuddleResponse3),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("projects/3/ticket_reports") && y.Method == Method.GET))).Returns(restResponse3);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(3, It.IsAny<string>())).Returns((Card)null);
			MockLeanKitApi.Setup(x => x.AddCard(3, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("projects/4/ticket_reports") && y.Method == Method.GET))).Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(4, It.IsAny<string>())).Returns(new Card() { Id = 4, ExternalSystemName = "Unfuddle" });
			MockLeanKitApi.Setup(x => x.AddCard(4, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("projects/5/ticket_reports") && y.Method == Method.GET))).Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(5, It.IsAny<string>())).Returns(new Card() { Id = 4, ExternalSystemName = "Unfuddlest" });
			MockLeanKitApi.Setup(x => x.AddCard(5, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);
		}
		protected override void OnArrange() 
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<Unfuddle.Person>();

			var user1 = new Unfuddle.Person()
				{
					Email = "*****@*****.**",
					First_Name = "Johnny",
					Id = 1,
					Last_Name = "Cash",
					Username = "******"
				};

			var user2 = new Unfuddle.Person()
			{
				Email = "*****@*****.**",
				First_Name = "Willy",
				Id = 2,
				Last_Name = "Cash",
				Username = "******"
			};

			var user3 = new Unfuddle.Person()
			{
				Email = "",
				First_Name = "",
				Id = 3,
				Last_Name = "",
				Username = ""
			};

			var restResponse1 = new RestResponse() { Content = serializer.SerializeToString(user1), StatusCode = HttpStatusCode.OK };
			var restResponse2 = new RestResponse() { Content = serializer.SerializeToString(user2), StatusCode = HttpStatusCode.OK };
			var restResponse3 = new RestResponse() { Content = serializer.SerializeToString(user3), StatusCode = HttpStatusCode.OK };

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("people/1")))).Returns(restResponse1);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("people/2")))).Returns(restResponse2);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("people/3")))).Returns(restResponse3);
		}
		protected override void OnArrange() 
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<Unfuddle.Ticket>();

			var ticket1 = new Unfuddle.Ticket()
			{
				Id = 1,
				Status = "Open"
			};

			var restResponse1 = new RestResponse() { Content = serializer.SerializeToString(ticket1), StatusCode = HttpStatusCode.OK };

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/1") && y.Method == Method.GET))).Returns(restResponse1);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/1") && y.Method == Method.PUT))).Returns(restResponse1);

			var ticket2 = new Unfuddle.Ticket()
			{
				Id = 2,
				Status = "Closed"
			};

			var restResponse2 = new RestResponse() { Content = serializer.SerializeToString(ticket2), StatusCode = HttpStatusCode.OK };

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/2") && y.Method == Method.GET))).Returns(restResponse2);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/2") && y.Method == Method.PUT))).Returns(restResponse2);

			var errorSerializer = new JsonSerializer<Unfuddle.ErrorMessage>();
			var errorResponse = new RestResponse() { Content = errorSerializer.SerializeToString(new Unfuddle.ErrorMessage() { Message = "Error" }), StatusCode = HttpStatusCode.NotFound };

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/3") && y.Method == Method.GET))).Returns(errorResponse);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("tickets/3") && y.Method == Method.PUT))).Returns(errorResponse);
		}
		protected override void OnArrange()
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);
			
			var serializer = new JsonSerializer<List<GitHubIssues.Issue>>();

			var issue1 = new GitHubIssues.Issue()
				{
					Id = 1,
					Number = 1,
					State = "Open", 
					Body = "New Issue 1", 
					Title = "New Issue 1"
				};

			var issue2 = new GitHubIssues.Issue()
			{
				Id = 2,
				Number = 2,
				State = "Open",
				Body = "New Issue 2",
				Title = "New Issue 2"
			};

			var issue3 = new GitHubIssues.Issue()
			{
				Id = 3,
				Number = 3,
				State = "Open",
				Body = "New Issue 3",
				Title = "New Issue 3"
			};

			var restResponse1 = new RestResponse()
				{
					Content = serializer.SerializeToString(new List<GitHubIssues.Issue>() { issue1 }),
					StatusCode = HttpStatusCode.OK
				};

			var noRestResponse = new RestResponse() {StatusCode = HttpStatusCode.OK, Content = ""};

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/1/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() == "Open"))).Returns(restResponse1);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/1/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() != "Open"))).Returns(noRestResponse);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(1, It.IsAny<string>())).Returns((Card)null);
			MockLeanKitApi.Setup(x => x.AddCard(1, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/2/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() == "Open"))).Returns(restResponse1);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/2/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() != "Open"))).Returns(noRestResponse);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(2, It.IsAny<string>())).Returns((Card)null);
			MockLeanKitApi.Setup(x => x.AddCard(2, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);
			
			var restResponse3 = new RestResponse()
				{
					Content = serializer.SerializeToString(new List<GitHubIssues.Issue>() {issue1, issue2, issue3}),
					StatusCode = HttpStatusCode.OK
				};

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/3/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() == "Open"))).Returns(restResponse3);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/3/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() != "Open"))).Returns(noRestResponse);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(3, It.IsAny<string>())).Returns((Card)null);
			MockLeanKitApi.Setup(x => x.AddCard(3, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/4/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() == "Open"))).Returns(restResponse1);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/4/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() != "Open"))).Returns(noRestResponse);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(4, It.IsAny<string>())).Returns(new Card() { Id = 4, ExternalSystemName = "GitHub"});
			MockLeanKitApi.Setup(x => x.AddCard(4, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/5/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() == "Open"))).Returns(restResponse1);
			MockRestClient.Setup(x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("/5/issues") && y.Method == Method.GET && y.Parameters[0].Value.ToString() != "Open"))).Returns(noRestResponse);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(5, It.IsAny<string>())).Returns(new Card() { Id = 4, ExternalSystemName = "GitHubby" });
			MockLeanKitApi.Setup(x => x.AddCard(5, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);
		}
		protected override void OnArrange()
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<Jira.Issue>();

			var issue1 = new Jira.Issue()
			{
				Id = 1,
				Key = "one",
				Fields = new Jira.Fields() {Status = new Jira.Status() {Name = "Open"}}
			};

			var restResponse1 = new RestResponse()
			{
				Content = serializer.SerializeToString(issue1),
				StatusCode = HttpStatusCode.OK
			};

			var transitions1 = new Jira.TransitionsResponse()
			{
				Transitions =
					new List<Jira.Transition>()
					{
						new Jira.Transition()
						{
							Id = "2",
							Name = "Closed",
							To = new Jira.Status() {Name = "Closed", Description = "Closed", Id = "2"}
						}
					}
			};

			var transitionsSerializer = new JsonSerializer<Jira.TransitionsResponse>();
			var restTransitionsResponse1 = new RestResponse()
			{
				Content = transitionsSerializer.SerializeToString(transitions1),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/one") && y.Method == Method.GET)))
				.Returns(restResponse1);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("2/issue/one/transitions") && y.Method == Method.GET)))
				.Returns(restTransitionsResponse1);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("issue/one/transitions") && y.Method == Method.POST)))
				.Returns(restResponse1);

			var issue2 = new Jira.Issue()
			{
				Id = 2,
				Key = "two",
				Fields = new Jira.Fields() {Status = new Jira.Status() {Name = "Closed"}}
			};

			var restResponse2 = new RestResponse()
			{
				Content = serializer.SerializeToString(issue2),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/two") && y.Method == Method.GET)))
				.Returns(restResponse2);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("2/issue/two/transitions") && y.Method == Method.GET)))
				.Returns(restTransitionsResponse1);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("issue/two/transitions") && y.Method == Method.POST)))
				.Returns(restResponse2);

			var errorSerializer = new JsonSerializer<Jira.ErrorMessage>();
			var errorResponse = new RestResponse()
			{
				Content = errorSerializer.SerializeToString(new Jira.ErrorMessage() {Message = "Error"}),
				StatusCode = HttpStatusCode.NotFound
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/three") && y.Method == Method.GET)))
				.Returns(errorResponse);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("2/issue/three/transitions") && y.Method == Method.GET)))
				.Returns(restTransitionsResponse1);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("issue/three/transitions") && y.Method == Method.POST)))
				.Returns(errorResponse);

			var issue4 = new Jira.Issue()
			{
				Id = 4,
				Key = "four",
				Fields = new Jira.Fields() {Status = new Jira.Status() {Name = "Open"}}
			};

			var restResponse4 = new RestResponse()
			{
				Content = serializer.SerializeToString(issue4),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/four") && y.Method == Method.GET)))
				.Returns(restResponse4);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("2/issue/four/transitions") && y.Method == Method.GET)))
				.Returns(errorResponse);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("issue/four/transitions") && y.Method == Method.POST)))
				.Returns(restResponse4);

			var transitions2 = new Jira.TransitionsResponse()
			{
				Transitions =
					new List<Jira.Transition>()
					{
						new Jira.Transition()
						{
							Id = "3",
							Name = "Resolved",
							To = new Jira.Status() {Name = "Resolved", Description = "Resolved", Id = "3"}
						}
					}
			};

			var restTransitionsResponse2 = new RestResponse()
			{
				Content = transitionsSerializer.SerializeToString(transitions2),
				StatusCode = HttpStatusCode.OK
			};

			var issue5 = new Jira.Issue()
			{
				Id = 5,
				Key = "five",
				Fields = new Jira.Fields() {Status = new Jira.Status() {Name = "Open"}}
			};

			var restResponse5 = new RestResponse()
			{
				Content = serializer.SerializeToString(issue5),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/five") && y.Method == Method.GET)))
				.Returns(restResponse5);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("2/issue/five/transitions") && y.Method == Method.GET)))
				.Returns(restTransitionsResponse2);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("issue/five/transitions") && y.Method == Method.POST)))
				.Returns(restResponse5);
		}
		protected override void OnArrange()
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<Jira.Issue>();

			var issue1 = new Jira.Issue()
			{
				Id = 1,
				Key = "one",
				Fields = new Jira.Fields()
				{
					Status = new Jira.Status() {Name = "Open"},
					Description = "Issue 1",
					Summary = "Issue 1"
				}
			};

			var restResponse1 = new RestResponse()
			{
				Content = serializer.SerializeToString(issue1),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/one") && y.Method == Method.GET)))
				.Returns(restResponse1);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/one") && y.Method == Method.PUT)))
				.Returns(restResponse1);

			var issue2 = new Jira.Issue()
			{
				Id = 2,
				Key = "two",
				Fields = new Jira.Fields()
				{
					Status = new Jira.Status() {Name = "Open"},
					Description = "Issue 2",
					Summary = "Issue 2"
				}
			};

			var restResponse2 = new RestResponse()
			{
				Content = serializer.SerializeToString(issue2),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/two") && y.Method == Method.GET)))
				.Returns(restResponse2);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/two") && y.Method == Method.PUT)))
				.Returns(restResponse2);

			var issue3 = new Jira.Issue()
			{
				Id = 3,
				Key = "three",
				Fields = new Jira.Fields()
				{
					Status = new Jira.Status() {Name = "Open"},
					Description = "Issue 3",
					Summary = "Issue 3"
				}
			};

			var restResponse3 = new RestResponse()
			{
				Content = serializer.SerializeToString(issue3),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/three") && y.Method == Method.GET)))
				.Returns(restResponse3);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/three") && y.Method == Method.PUT)))
				.Returns(restResponse3);

			var issue4 = new Jira.Issue()
			{
				Id = 4,
				Key = "four",
				Fields = new Jira.Fields()
				{
					Status = new Jira.Status() {Name = "Open"},
					Description = "Issue 4",
					Summary = "Issue 4"
				}
			};

			var restResponse4 = new RestResponse()
			{
				Content = serializer.SerializeToString(issue4),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/four") && y.Method == Method.GET)))
				.Returns(restResponse4);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue/four") && y.Method == Method.PUT)))
				.Returns(restResponse4);
		}
		protected override void OnArrange()
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<Jira.Issue>();
			var prioritySerializer = new JsonSerializer<Jira.Priority[]>();

			var issue1 = new Jira.Issue()
			{
				Id = 1,
				Key = "one",
				Fields = new Jira.Fields()
				{
					Status = new Jira.Status() {Name = "Open"},
					Description = "Issue 1",
					Summary = "Issue 1"
				}
			};

			var priorities = new List<Jira.Priority>
			{
				new Jira.Priority
				{
					Description = "Blocks",
					Id = "1",
					Name = "Blocker"
				},
				new Jira.Priority
				{
					Description = "Crashes",
					Id = "2",
					Name = "Critical"
				},
				new Jira.Priority
				{
					Description = "Major",
					Id = "3",
					Name = "Major"
				},
				new Jira.Priority
				{
					Description = "Minor",
					Id = "4",
					Name = "Minor"
				},
				new Jira.Priority
				{
					Description = "Trivial",
					Id = "1",
					Name = "Trivial"
				}
			}.ToArray();

			var restResponse1 = new RestResponse()
			{
				Content = serializer.SerializeToString(issue1),
				StatusCode = HttpStatusCode.OK
			};

			var restResponse2 = new RestResponse()
			{
				Content = prioritySerializer.SerializeToString(priorities),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/issue") && y.Method == Method.POST)))
				.Returns(restResponse1);
			MockRestClient.Setup(
				x => x.Execute(It.Is<RestRequest>(y => y.Resource.Contains("latest/priority") && y.Method == Method.GET)))
				.Returns(restResponse2);
		}
		protected override void OnArrange()
		{
			base.OnArrange();

			MockLeanKitApi.Setup(x => x.GetBoard(It.IsAny<long>())).Returns(_testBoard);

			var serializer = new JsonSerializer<Jira.IssuesResponse>();

			var issue1 = new Jira.Issue()
			{
				Id = 1,
				Key = "one",
				Fields = new Jira.Fields()
				{
					Description = "Issue 1",
					Status = new Jira.Status() {Description = "Open", Id = "1", Name = "Open"},
					Summary = "Issue 1"
				}
			};

			var issue2 = new Jira.Issue()
			{
				Id = 2,
				Key = "two",
				Fields = new Jira.Fields()
				{
					Description = "Issue 2",
					Status = new Jira.Status() {Description = "Open", Id = "1", Name = "Open"},
					Summary = "Issue 2"
				}
			};

			var issue3 = new Jira.Issue()
			{
				Id = 3,
				Key = "three",
				Fields = new Jira.Fields()
				{
					Description = "Issue 3",
					Status = new Jira.Status() {Description = "Open", Id = "1", Name = "Open"},
					Summary = "Issue 3"
				}
			};

			var issueResponse1 = new Jira.IssuesResponse()
			{
				Issues = new List<Jira.Issue>() {issue1}
			};

			var restResponse1 = new RestResponse()
			{
				Content = serializer.SerializeToString(issueResponse1),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x =>
					x.Execute(
						It.Is<RestRequest>(
							y =>
								y.Resource.Contains("/search") && y.Method == Method.GET &&
								y.Parameters.FirstOrDefault(z => z.Name == "jql" && z.Value.ToString().Contains("project=\"1\"")) != null)))
				.Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(1, It.IsAny<string>())).Returns((Card) null);
			MockLeanKitApi.Setup(x => x.AddCard(1, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(
				x =>
					x.Execute(
						It.Is<RestRequest>(
							y =>
								y.Resource.Contains("/search") && y.Method == Method.GET &&
								y.Parameters.FirstOrDefault(z => z.Name == "jql" && z.Value.ToString().Contains("project=\"2\"")) != null)))
				.Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(2, It.IsAny<string>())).Returns((Card) null);
			MockLeanKitApi.Setup(x => x.AddCard(2, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			var issueResponse3 = new Jira.IssuesResponse()
			{
				Issues = new List<Jira.Issue>() {issue1, issue2, issue3}
			};

			var restResponse3 = new RestResponse()
			{
				Content = serializer.SerializeToString(issueResponse3),
				StatusCode = HttpStatusCode.OK
			};

			MockRestClient.Setup(
				x =>
					x.Execute(
						It.Is<RestRequest>(
							y =>
								y.Resource.Contains("/search") && y.Method == Method.GET &&
								y.Parameters.FirstOrDefault(z => z.Name == "jql" && z.Value.ToString().Contains("project=\"3\"")) != null)))
				.Returns(restResponse3);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(3, It.IsAny<string>())).Returns((Card) null);
			MockLeanKitApi.Setup(x => x.AddCard(3, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(
				x =>
					x.Execute(
						It.Is<RestRequest>(
							y =>
								y.Resource.Contains("/search") && y.Method == Method.GET &&
								y.Parameters.FirstOrDefault(z => z.Name == "jql" && z.Value.ToString().Contains("project=\"4\"")) != null)))
				.Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(4, It.IsAny<string>()))
				.Returns(new Card() {Id = 4, ExternalSystemName = "Jira"});
			MockLeanKitApi.Setup(x => x.AddCard(4, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);

			MockRestClient.Setup(
				x =>
					x.Execute(
						It.Is<RestRequest>(
							y =>
								y.Resource.Contains("/search") && y.Method == Method.GET &&
								y.Parameters.FirstOrDefault(z => z.Name == "jql" && z.Value.ToString().Contains("project=\"5\"")) != null)))
				.Returns(restResponse1);
			MockLeanKitApi.Setup(x => x.GetCardByExternalId(5, It.IsAny<string>()))
				.Returns(new Card() {Id = 4, ExternalSystemName = "Jirabus"});
			MockLeanKitApi.Setup(x => x.AddCard(5, It.IsAny<Card>(), It.IsAny<string>())).Returns(_testCardAddResult1);
		}