public void TestMargins() { string json = File.ReadAllText(@"C:\Users\ssijb\source\repos\ssijbabu\crudify\KiteonnectUnitTest\responses\margins.json", Encoding.UTF8); MockServer ms = new MockServer("http://localhost:8080/", "application/json", json); Kite kite = new Kite("apikey", Root: "http://localhost:8080"); UserMarginsResponse margins = kite.GetMargins(); Assert.Equal(margins.Equity.Net, (decimal)1697.7); Assert.Equal(margins.Commodity.Net, (decimal) - 8676.296); }
public void TestMargins() { string json = File.ReadAllText(@"responses/margins.json", Encoding.UTF8); ms.SetResponse("application/json", json); Kite kite = new Kite("apikey", Root: "http://localhost:8080"); UserMarginsResponse margins = kite.GetMargins(); Assert.AreEqual(margins.Equity.Net, (decimal)1697.7); Assert.AreEqual(margins.Commodity.Net, (decimal) - 8676.296); }