feat: complete legacy UI and playout parity migration
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using MBN_STOCK_WEBVIEW.LegacyBridge;
|
||||
|
||||
namespace MBN_STOCK_WEBVIEW.LegacyBridge.Tests;
|
||||
|
||||
public sealed class LegacySectionBatchBridgeTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("activate-industry-section", typeof(LegacyActivateIndustrySectionIntent))]
|
||||
[InlineData("activate-comparison-section", typeof(LegacyActivateComparisonSectionIntent))]
|
||||
public void SectionBatchIntentAcceptsOnlyOneBoundedOpaqueIndex(
|
||||
string type,
|
||||
Type expectedType)
|
||||
{
|
||||
Assert.True(LegacyBridgeProtocol.TryParseIntent(
|
||||
$"{{\"type\":\"{type}\",\"payload\":{{\"sectionIndex\":1}}}}",
|
||||
out var intent,
|
||||
out _));
|
||||
Assert.IsType(expectedType, intent);
|
||||
|
||||
Assert.False(LegacyBridgeProtocol.TryParseIntent(
|
||||
$"{{\"type\":\"{type}\",\"payload\":{{\"sectionIndex\":64}}}}",
|
||||
out _,
|
||||
out _));
|
||||
Assert.False(LegacyBridgeProtocol.TryParseIntent(
|
||||
$"{{\"type\":\"{type}\",\"payload\":{{\"sectionIndex\":1,\"actions\":[]}}}}",
|
||||
out _,
|
||||
out _));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user