func (s *WorkItemSuite) TestReorderWorkitemBadRequestOK() {
	payload := minimumRequiredCreateWithType(workitem.SystemBug)
	payload.Data.Attributes[workitem.SystemTitle] = "Reorder Test WI"
	payload.Data.Attributes[workitem.SystemState] = workitem.SystemStateClosed
	_, result1 := test.CreateWorkitemCreated(s.T(), s.svc.Context, s.svc, s.controller, payload.Data.Relationships.Space.Data.ID.String(), &payload)
	payload2 := minimumRequiredReorderPayload()

	// This case gives empty dataArray as input
	// Response is Bad Parameter
	// Reorder is unsuccessful

	var dataArray []*app.WorkItem
	payload2.Data = dataArray
	payload2.Position.ID = result1.Data.ID
	payload2.Position.Direction = string(workitem.DirectionAbove)
	test.ReorderWorkitemBadRequest(s.T(), s.svc.Context, s.svc, s.controller, space.SystemSpace.String(), &payload2)
}
// TestReorderWorkitemBadRequest is negative test which tests unsuccessful reorder by providing invalid input
TestReorderWorkitemBadRequest is negative test which tests unsuccessful reorder by providing invalid input
// TestReorderWorkitemBadRequest is negative test which tests unsuccessful reorder by providing invalid input
func (s *WorkItemSuite) TestReorderWorkitemBadRequestOK() {
	payload := minimumRequiredCreateWithType(workitem.SystemBug)
	payload.Data.Attributes[workitem.SystemTitle] = "Reorder Test WI"
	payload.Data.Attributes[workitem.SystemState] = workitem.SystemStateClosed
	_, result1 := test.CreateWorkitemCreated(s.T(), s.svc.Context, s.svc, s.controller, payload.Data.Relationships.Space.Data.ID.String(), &payload)
	payload2 := minimumRequiredReorderPayload()
	var dataArray []*app.WorkItem
	payload2.Data = dataArray
	payload2.Position.ID = result1.Data.ID
	payload2.Position.Direction = string(workitem.DirectionAbove)
	test.ReorderWorkitemBadRequest(s.T(), s.svc.Context, s.svc, s.controller, space.SystemSpace.String(), &payload2)
}
func ( s * WorkItemSuite ) TestReorderWorkitemBadRequestOK ( ) { payload := minimumRequiredCreateWithType ( workitem . SystemBug ) payload . Data . Attributes [ workitem . SystemTitle ] = " " payload . Data . Attributes [ workitem . SystemState ] = workitem . SystemStateClosed _ , result1 := test . CreateWorkitemCreated ( s . T ( ) , s . svc . Context , s . svc , s . controller , payload . Data . Relationships . Space . Data . ID . String ( ) , & payload ) payload2 := minimumRequiredReorderPayload ( ) var dataArray [ ] * app . WorkItem payload2 . Data = dataArray payload2 . Position . ID = result1 . Data . ID payload2 . Position . Direction = string ( workitem . DirectionAbove ) test . ReorderWorkitemBadRequest ( s . T ( ) , s . svc . Context , s . svc , s . controller , space . SystemSpace . String ( ) , & payload2 ) }
TestReorderWorkitemBadRequest is negative test which tests unsuccessful reorder by providing invalid input
TestReorderWorkitemBadRequest is negative test which tests unsuccessful reorder by providing invalid input
// This case gives empty dataArray as input // Response is Bad Parameter // Reorder is unsuccessful