Skip to content

Commit f70be3b

Browse files
committed
surely, this will fix all my pain
1 parent 67e9733 commit f70be3b

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

CoreOSC.Tests/IntegrationTest.TestMessage.verified.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
AgME,
88
-123456789123,
99
{
10-
Tag: 17002009434311884800,
10+
Tag: 17070289106396774400,
1111
Timestamp: DateTime_1,
12-
Seconds: 3958588800.921681
12+
Seconds: 3974486400.925382
1313
},
1414
{
15-
Tag: 17013141989543116800,
15+
Tag: 17081792746802380800,
1616
Timestamp: DateTime_2,
17-
Seconds: 3961180800.922284
17+
Seconds: 3977164800.926006
1818
},
1919
1234567.89,
2020
{

CoreOSC.Tests/IntegrationTest.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
namespace LucHeart.CoreOSC.Tests;
1+
using System.Diagnostics;
2+
3+
namespace LucHeart.CoreOSC.Tests;
24

35
public class IntegrationTest
46
{
7+
private static readonly DateTime TestDate = DateTime.Parse("2025-12-12T12:34:56Z");
8+
59
[Test, Timeout(5000)]
610
public async Task TestMessage(CancellationToken ct)
711
{
@@ -17,8 +21,8 @@ public async Task TestMessage(CancellationToken ct)
1721
"hello world",
1822
new byte[] { 2, 3, 4 },
1923
-123456789123,
20-
new TimeTag(DateTime.Now.Date).Tag,
21-
new TimeTag(DateTime.Now.Date.AddMonths(1)),
24+
new TimeTag(TestDate.Date).Tag,
25+
new TimeTag(TestDate.Date.AddMonths(1)),
2226
1234567.890,
2327
new Symbol("wut wut"),
2428
'x',
@@ -45,7 +49,7 @@ public async Task TestBundle(CancellationToken ct)
4549
using var sender1 = new OscSender(endpoint);
4650
var msg1 = new OscMessage("/test/address1", 23, 42.42f, "hello world", new byte[] { 2, 3, 4 });
4751
var msg2 = new OscMessage("/test/address2", 34, 24.24f, "hello again", new byte[] { 5, 6, 7, 8, 9 });
48-
var dt = Utils.DateTimeToTimeTag(DateTime.Parse("2025-12-12T12:34:56Z"));
52+
var dt = Utils.DateTimeToTimeTag(TestDate);
4953
var bundle = new OscBundle(dt, msg1, msg2);
5054

5155
await sender1.SendAsync(bundle);

0 commit comments

Comments
 (0)