Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase Unit test code coverage #496

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

hokwaichan
Copy link
Contributor

@hokwaichan hokwaichan commented Oct 6, 2023

Ticket Link

Groupings-1371

List of squashed commits

  • cover exceptions begin convering JsonUtil
  • Added test for describeTo
  • Added test for toLocalDate
  • Added assertDoesNotThrow for functions to handle exception
  • Added test for uhCasAttributes default constructor
  • Added toString test for Membership class (type)
  • Added test for person class subject constructor (type)
  • Added test for group class isMember (type)
  • Added tests for GroupingsServiceResultException class constructor, getGsr and setGsr (type)
  • Added test for GroupingMember
  • Added test for GroupingsUpdatedAttributesResult (groupings)
  • Added test for GroupingGroupsMembers (groupings)
  • Added test for GroupingSyncDestination (groupings)
  • Added test for hasUHAttributes (wrapper -> SubjectTest)
  • Added test for getBoolean (Wrapper -> ResultsTest)
  • Added test for isTimeUpdated (Wrapper -> UpdatedTimestampResult)
  • Create AttributeAssignValueResultTest and add tests
  • Refactor construction to constructor
  • Added more tests for AssignAttributesResultsTest
  • Added nullResultCode (wrapper -> UpdatedTimestampResult)
  • Added null test for ParentGroupingPath (service → PathFilter)
  • Begin covering MemberService
  • Cover some test in GroupingAssignmentServiceTest, and MemberServiceTest
  • Remove unused functions
  • Cover JavaVersionChecker
  • Implement AsyncJobsManagerTest and cover (Service)
  • FIx import
  • Implement ExecutorServiceTest and add tests
  • Add addAdminTest
  • Implement addOwnershipsTest
  • Implement removeAdminTest
  • Implement removeOwnershipsTest and addIncludeMembersTest
  • Implemented addExcludeMembersTest, removeIncludeMembersTest, removeIncludeMemberTest, removeExcludeMembersTest, removeExcludeMemberTest, optInTest, and optOutTest
  • Removed getGroupingTest
  • Increase Unit test code coverage
  • cover exceptions begin convering JsonUtil
  • Fixed conflict
  • Removed unused import

Test Checklist

  • Exhibits Clear Code Structure:
  • Project Unit Tests Passed:
  • Project Integration Tests Passed:
  • Executes Expected Functionality:
  • Tested For Incorrect/Unexpected Inputs:

@hokwaichan hokwaichan force-pushed the dev-hokwai-1371 branch 4 times, most recently from ea29a21 to 4a730a8 Compare October 6, 2023 21:39
Copy link
Member

@mhodgesatuh mhodgesatuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to me like a significant improvement and so I have approved it. Note that there's one issue given our practice of only testing with a fixed set of uids and uhUuids:

src/test/java/edu/hawaii/its/api/access/UhCasAttributesTest.java
219. assertThat(attributes.toString(), containsString("uid=duckart"));

Standard practice is to only use uid’s from
o https://uhawaii.atlassian.net/wiki/spaces/SITARd/pages/12944666/Project+Security+and+Test+Data

@mhodgesatuh
Copy link
Member

Codacy reports that the following is unused:
import org.mockito.MockitoAnnotations;

@JorWo JorWo merged commit 6fa7b4d into uhawaii-system-its-ti-iam:main Oct 13, 2023
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.

3 participants