Skip to content

Add test coverage for deleteAssignment methods#77

Merged
sebastianchristopher merged 2 commits intoallow-deletetion-by-lti-context-idfrom
copilot/sub-pr-76
Feb 5, 2026
Merged

Add test coverage for deleteAssignment methods#77
sebastianchristopher merged 2 commits intoallow-deletetion-by-lti-context-idfrom
copilot/sub-pr-76

Conversation

Copy link

Copilot AI commented Feb 4, 2026

The deleteAssignment methods (both Integer and String overloads) lacked explicit test coverage, inconsistent with other writer operations like createAssignment which have comprehensive tests.

Changes

  • AssignmentWriterUTest.java: New test class covering both deleteAssignment(String, Integer) and deleteAssignment(String, String) methods
  • DeletedAssignment.json: Sample response data for delete operations

Tests

// Tests deletion with numeric ID
assignmentWriter.deleteAssignment("1234", 123);

// Tests deletion with LTI context ID
assignmentWriter.deleteAssignment("1234", "lti_context_id:ab84f579-4442-4d4a-acd8-85c5ec6fd2b6");

// Tests deletion with numeric string ID
assignmentWriter.deleteAssignment("1234", "456");

Pattern follows existing writer tests (CalendarWriterUTest, CourseManagerUTest) using FakeRestClient for API mocking.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: sebastianchristopher <40264653+sebastianchristopher@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on deletion by LTI context ID Add test coverage for deleteAssignment methods Feb 4, 2026
@sebastianchristopher sebastianchristopher marked this pull request as ready for review February 5, 2026 09:24
@sebastianchristopher sebastianchristopher merged commit e10b720 into allow-deletetion-by-lti-context-id Feb 5, 2026
@sebastianchristopher sebastianchristopher deleted the copilot/sub-pr-76 branch February 5, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants