Skip to content

chore: Move the tests into one file for ReactiveExtensions.cs#101

Merged
glennawatson merged 8 commits intomainfrom
glennawatson-patch-1
Nov 13, 2025
Merged

chore: Move the tests into one file for ReactiveExtensions.cs#101
glennawatson merged 8 commits intomainfrom
glennawatson-patch-1

Conversation

@glennawatson
Copy link
Contributor

@glennawatson glennawatson commented Nov 13, 2025

This PR consolidates test files by moving all tests from ComprehensiveReactiveExtensionsTests.cs into the existing ReactiveExtensionsTests.cs file, then removing the former. This improves test organization by keeping all tests for ReactiveExtensions in a single location.

  • Deleted ComprehensiveReactiveExtensionsTests.cs file completely
  • All test methods retain their original implementation and documentation

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR consolidates test files by moving all tests from ComprehensiveReactiveExtensionsTests.cs into the existing ReactiveExtensionsTests.cs file, then removing the former. This improves test organization by keeping all tests for ReactiveExtensions in a single location.

  • Moved 1,719 lines of test code from ComprehensiveReactiveExtensionsTests.cs to ReactiveExtensionsTests.cs
  • Deleted ComprehensiveReactiveExtensionsTests.cs file completely
  • All test methods retain their original implementation and documentation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 57 comments.

File Description
src/ReactiveUI.Extensions.Tests/ReactiveExtensionsTests.cs Added comprehensive test methods from ComprehensiveReactiveExtensionsTests.cs, covering BufferUntil, CatchIgnore, CombineLatest, GetMax/GetMin, DetectStale, Conflate, Heartbeat, WithLimitedConcurrency, OnNext, ObserveOnSafe, scheduling, filtering, retry logic, synchronization, and various other ReactiveExtensions operators. Minor indentation issue detected on line 235.
src/ReactiveUI.Extensions.Tests/ComprehensiveReactiveExtensionsTests.cs Removed entire file containing 1,739 lines of test code that was moved to ReactiveExtensionsTests.cs

[Test]
public void CombineLatestValuesAreAllFalse_WhenAllFalse_ReturnsTrue()
{
var subject1 = new BehaviorSubject<bool>(false);
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Disposable 'BehaviorSubject' is created but not disposed.

Copilot uses AI. Check for mistakes.
public void BufferUntilInactive_BuffersValuesUntilInactivity()
{
var scheduler = new TestScheduler();
var subject = new Subject<int>();
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Disposable 'Subject' is created but not disposed.

Suggested change
var subject = new Subject<int>();
using var subject = new Subject<int>();

Copilot uses AI. Check for mistakes.
{
var executed = false;
IScheduler? scheduler = null;
var disposable = scheduler.ScheduleSafe(() => executed = true);
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Variable scheduler is always null at this dereference.

Suggested change
var disposable = scheduler.ScheduleSafe(() => executed = true);
var disposable = ScheduleSafe(scheduler, () => executed = true);

Copilot uses AI. Check for mistakes.
var executed = false;
IScheduler? scheduler = null;

scheduler.ScheduleSafe(() => executed = true);
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Variable scheduler is always null at this dereference.

Copilot uses AI. Check for mistakes.
var executed = false;
IScheduler? scheduler = null;

scheduler.ScheduleSafe(TimeSpan.FromMilliseconds(10), () => executed = true);
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Variable scheduler is always null at this dereference.

Copilot uses AI. Check for mistakes.
Copilot AI and others added 5 commits November 13, 2025 16:26
* Initial plan

* Add missing using statements to fix compilation errors

Co-authored-by: glennawatson <5834289+glennawatson@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: glennawatson <5834289+glennawatson@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.33%. Comparing base (5cf1405) to head (252d2b5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #101   +/-   ##
=======================================
  Coverage   80.33%   80.33%           
=======================================
  Files           8        8           
  Lines         651      651           
  Branches       64       64           
=======================================
  Hits          523      523           
  Misses        104      104           
  Partials       24       24           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glennawatson glennawatson merged commit e2490c0 into main Nov 13, 2025
6 checks passed
@glennawatson glennawatson deleted the glennawatson-patch-1 branch November 13, 2025 05:33
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments