-
Notifications
You must be signed in to change notification settings - Fork 264
Open
Labels
code qualityTest or general code quality relatedTest or general code quality related
Milestone
Description
Problem
The WilliamsR StreamHub indicator currently has basic rollback validation but doesn't follow the full comprehensive pattern established for other indicators. The test should be enhanced to match the canonical EMA/ADX pattern.
Required Test Cases
The WilliamsR QuoteObserver test should include (following the canonical EMA/ADX pattern):
- Prefill warmup: Add 20-30 quotes before observer initialization
- Streaming with skip: Stream remaining quotes, skip quote at index 80
- Duplicate handling: Resend duplicates for indices 101-104
- Late arrival (Insert): Insert the skipped quote and verify Series parity
- Removal: Remove quote at
removeAtIndexconstant (495) from base class, not hardcoded value - Revised series parity: Use RevisedQuotes from base class for comparison
- Strict ordering: Use
BeEquivalentTo(series, o => o.WithStrictOrdering()) - Cleanup: Call Unsubscribe() and EndTransmission()
Key Requirements
- Must use base class
removeAtIndexconstant (495) for consistency across tests - Must use base class
RevisedQuotesfor revised series comparison - Should follow exact pattern from
tests/indicators/e-k/Ema/Ema.StreamHub.Tests.cs
Reference
- Project task: T177 (Comprehensive Rollback Validation)
- Task file:
.specify/specs/001-develop-streaming-indicators/tasks.md - Canonical pattern:
tests/indicators/e-k/Ema/Ema.StreamHub.Tests.csQuoteObserver method - Current test:
tests/indicators/s-z/WilliamsR/WilliamsR.StreamHub.Tests.cs - Implementation:
src/s-z/WilliamsR/WilliamsR.StreamHub.cs
Success Criteria
- All comprehensive rollback test cases pass
- Uses base class constants (removeAtIndex, RevisedQuotes) consistently
- Follows exact pattern from canonical EMA test
- No hardcoded indices or test data
This is a follow-on task from #1723
coderabbitai and Copilot
Metadata
Metadata
Assignees
Labels
code qualityTest or general code quality relatedTest or general code quality related
Projects
Status
No status