Skip to content

Enhance the code coverage of testing#255

Merged
mercyblitz merged 8 commits intomicrosphere-projects:devfrom
mercyblitz:dev
Mar 18, 2026
Merged

Enhance the code coverage of testing#255
mercyblitz merged 8 commits intomicrosphere-projects:devfrom
mercyblitz:dev

Conversation

@mercyblitz
Copy link
Contributor

This pull request primarily adds new and enhanced unit tests across several modules to improve test coverage and reliability, while also making a minor default value fix in the Deprecation builder and incrementing the project version. The new tests cover edge cases and additional scenarios for converters, filters, events, JSON exceptions, language utilities, predicates, I/O, mutable integers, class utilities, and version handling.

Testing improvements:

  • Added comprehensive unit tests for the following components:
    • StringToByteConverter (including failure cases) (StringToByteConverterTest.java)
    • ClassFileJarEntryFilter (acceptance and rejection cases) (ClassFileJarEntryFilterTest.java)
    • JSONException (constructor, type, and null message) (JSONExceptionTest.java)
    • GenericEvent (null source, timestamp bounds, ordering, and various source types) (GenericEventTest.java)
    • StringSerializer/StringDeserializer (custom charset, empty string, UTF-16 roundtrip) (StringSerializerAndDeserializerTest.java)
    • MutableInteger (zero/negative values, equality) (MutableIntegerTest.java)
    • Wrapper (handling of non-wrapper objects) (WrapperTest.java)
    • Predicates (single predicate and empty array cases) (PredicatesTest.java)
    • ClassUtils (inherited classes/interfaces, superclasses, and interface discovery) (ClassUtilsTest.java)
    • Version (operator parsing, comparison, and factory methods) (VersionTest.java)

Bug fix / Default value improvement:

  • Set a default value for the level field in the Deprecation.Builder class and added tests to ensure correct defaulting and field assignment (Deprecation.java, DeprecationTest.java). [1] [2]

Version update:

  • Bumped the project version from 0.1.8-SNAPSHOT to 0.1.9-SNAPSHOT in pom.xml.

mercyblitz and others added 8 commits March 14, 2026 10:49
Update the Maven <revision> property in pom.xml from 0.1.8-SNAPSHOT to 0.1.9-SNAPSHOT to prepare the next development iteration.
…yFilter

Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com>
…rage

Add missing test cases for StringToByteConverter and ClassFileJarEntryFilter
Add missing test cases for StringToByteConverter and ClassFileJarEntryFilter
Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com>
…est-cases

[WIP] Enhance code coverage for existing test cases
@sonarqubecloud
Copy link

@mercyblitz mercyblitz merged commit fbfbefe into microsphere-projects:dev Mar 18, 2026
6 checks passed
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ Complexity Δ
...src/main/java/io/microsphere/lang/Deprecation.java 100.00% <ø> (ø) 23.00 <0.00> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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