Skip to content

Comments

Add unit tests for model and notifier packages#361

Merged
hossain-khan merged 2 commits intomainfrom
copilot/increase-test-coverage
Nov 28, 2025
Merged

Add unit tests for model and notifier packages#361
hossain-khan merged 2 commits intomainfrom
copilot/increase-test-coverage

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

Increases test coverage for previously untested model conversion functions and notifier utilities.

New Test Coverage

  • DeviceAlertTest — Tests all format methods (toText, toExtendedText, toHtml, toJson) with battery/storage alert variants
  • DeviceAlertJsonPayloadTest — Tests JSON serialization with optional fields handling
  • AlertCheckLogTest — Tests toAlertCheckLog() extension functions for both AlertCheckLogEntity and AlertLogWithConfig
  • NotifierTypeTest — Tests enum display names
  • NotificationSenderExtTest — Tests of() extension function including error cases

Coverage Impact

Class Before After
AlertCheckLogKt 0% 100%
NotificationSenderKt.of() 0% 100%
DeviceAlert format methods partial comprehensive
Original prompt

This section details on the original issue you should resolve

<issue_title>Increase test coverage</issue_title>
<issue_description>Increase test coverage in key areas of the app.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…otificationSender

Co-authored-by: hossain-khan <99822+hossain-khan@users.noreply.github.com>
Copilot AI changed the title [WIP] Increase test coverage in key areas of the app Add unit tests for model and notifier packages Nov 28, 2025
Copilot AI requested a review from hossain-khan November 28, 2025 10:12
@hossain-khan hossain-khan marked this pull request as ready for review November 28, 2025 10:18
@github-actions
Copy link

github-actions bot commented Nov 28, 2025

Code Coverage Report

View Coverage Report

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

📊 APK Size Analysis

Comparing maincopilot/increase-test-coverage (this PR)

OLD: base.apk (signature: none)
NEW: app-release-unsigned.apk (signature: none)

          │          compressed          │         uncompressed         
          ├───────────┬───────────┬──────┼───────────┬───────────┬──────
 APK      │ old       │ new       │ diff │ old       │ new       │ diff 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
      dex │   6.2 MiB │   6.2 MiB │  0 B │   6.2 MiB │   6.2 MiB │  0 B 
     arsc │ 429.7 KiB │ 429.7 KiB │  0 B │ 429.6 KiB │ 429.6 KiB │  0 B 
 manifest │   3.6 KiB │   3.6 KiB │  0 B │  16.4 KiB │  16.4 KiB │  0 B 
      res │   160 KiB │   160 KiB │  0 B │   197 KiB │   197 KiB │  0 B 
   native │  60.1 KiB │  60.1 KiB │  0 B │  58.9 KiB │  58.9 KiB │  0 B 
    asset │   6.7 KiB │   6.7 KiB │  0 B │   6.4 KiB │   6.4 KiB │  0 B 
    other │   106 KiB │   106 KiB │ +1 B │ 172.2 KiB │ 172.2 KiB │  0 B 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
    total │   6.9 MiB │   6.9 MiB │ +1 B │     7 MiB │     7 MiB │  0 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 32846 │ 32846 │ 0 (+2 -2) 
   types │  8722 │  8722 │ 0 (+0 -0) 
 classes │  7437 │  7437 │ 0 (+0 -0) 
 methods │ 39793 │ 39793 │ 0 (+0 -0) 
  fields │ 23771 │ 23771 │ 0 (+0 -0) 

 ARSC    │ old │ new │ diff 
─────────┼─────┼─────┼──────
 configs │ 109 │ 109 │  0   
 entries │ 391 │ 391 │  0
APK
  compressed  │ uncompressed │                                           
───────┬──────┼───────┬──────┤                                           
 size  │ diff │ size  │ diff │ path                                      
───────┼──────┼───────┼──────┼───────────────────────────────────────────
 272 B │ +1 B │ 120 B │  0 B │ ∆ META-INF/version-control-info.textproto 
───────┼──────┼───────┼──────┼───────────────────────────────────────────
 272 B │ +1 B │ 120 B │  0 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff      
  ───────┼───────┼───────────
   32846 │ 32846 │ 0 (+2 -2) 
  
  + e276d65
  + v1.16 (e276d65)
  
  - 5fc0fc6
  - v1.16 (5fc0fc6)

Generated by Diffuse via diffuse-action

@hossain-khan hossain-khan merged commit 7080381 into main Nov 28, 2025
10 checks passed
@hossain-khan hossain-khan deleted the copilot/increase-test-coverage branch November 28, 2025 10:26
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.

Increase test coverage

2 participants