feat: add suitelink client runtime and test harness
This commit is contained in:
10
tests/SuiteLink.Client.Tests/Fixtures/FixtureBytes.cs
Normal file
10
tests/SuiteLink.Client.Tests/Fixtures/FixtureBytes.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace SuiteLink.Client.Tests.Fixtures;
|
||||
|
||||
internal static class FixtureBytes
|
||||
{
|
||||
public static byte[] Read(string fileName)
|
||||
{
|
||||
var path = Path.Combine(AppContext.BaseDirectory, "Fixtures", fileName);
|
||||
return File.ReadAllBytes(path);
|
||||
}
|
||||
}
|
||||
25
tests/SuiteLink.Client.Tests/Fixtures/README.md
Normal file
25
tests/SuiteLink.Client.Tests/Fixtures/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# SuiteLink Test Fixtures
|
||||
|
||||
This folder stores small binary packet fixtures used by protocol codec tests.
|
||||
|
||||
## Source and intent
|
||||
|
||||
- These fixtures are based on fixed vectors already used in tests and aligned with the reverse-engineered SuiteLink dissector behavior used in this repo's design docs.
|
||||
- They are intentionally minimal and validate specific assumptions, not full protocol coverage.
|
||||
|
||||
## Fixtures
|
||||
|
||||
- `handshake-ack-normal.bin`
|
||||
- Bytes: `06 00 01 00 A1 B2 C3 A5`
|
||||
- Assumption validated: normal handshake ACK frame type is `0x0001` with payload bytes preserved.
|
||||
- `advise-tagid-11223344-item-A.bin`
|
||||
- Bytes: `0A 00 10 80 44 33 22 11 01 41 00 A5`
|
||||
- Assumption validated: ADVISE message type bytes are `10 80` (little-endian `0x8010`) and item encoding is UTF-16LE length-prefixed.
|
||||
- `update-binary-tag-1234-true.bin`
|
||||
- Bytes: `0D 00 09 00 34 12 00 00 0A 00 C0 00 01 01 A5`
|
||||
- Assumption validated: UPDATE type bytes are `09 00` and binary value decode path maps to `true`.
|
||||
|
||||
## Notes
|
||||
|
||||
- Keep fixture count modest and focused on wire-level assumptions that are easy to regress.
|
||||
- If a fixture changes, update corresponding tests and document why the protocol assumption changed.
|
||||
Binary file not shown.
BIN
tests/SuiteLink.Client.Tests/Fixtures/handshake-ack-normal.bin
Normal file
BIN
tests/SuiteLink.Client.Tests/Fixtures/handshake-ack-normal.bin
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user