Skip to content

Commit

Permalink
Tests: expand GrpcE2ETest to use Partial
Browse files Browse the repository at this point in the history
Expand GrpcE2ETest so that Match.Partial case is used and
any serialization errors cancerning it will be caught by this
test.
  • Loading branch information
webwarrior-ws committed Sep 5, 2024
1 parent d002076 commit ee31d03
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/FX.Tests/E2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,19 @@ async public Task GrpcE2ETest()
await Task.Delay(TimeSpan.FromSeconds(1.0));

var client = new GrpcClient.Instance();
client.Connect();

var order = new GrpcModels.LimitOrder(1.0m, Side.Ask.ToString(), 1.0m);
var response = await client.SendMessage<GrpcModels.LimitOrder, FSharpOption<Match>>(order);

Assert.That(response.Value.IsFull);
Assert.That(response, Is.Null);

var client2 = new GrpcClient.Instance();

var order2 = new GrpcModels.LimitOrder(1.0m, Side.Bid.ToString(), 2.0m);
var response2 = await client2.SendMessage<GrpcModels.LimitOrder, FSharpOption<Match>>(order2);

Assert.That(response2.Value.IsPartial);
Assert.That((response2.Value as Match.Partial).Item, Is.EqualTo(1.0m));
}
}
}

0 comments on commit ee31d03

Please sign in to comment.