Example #1
0
        public void ShouldThrowForInvalidDays()
        {
            var sgx = new SgxClient();

            void TestNoRecord(Func <Task> test) => test.Should().Throw <HttpRequestException>().WithMessage("No Record Found");

            TestNoRecord(() => sgx.GetDay(0));
            TestNoRecord(() => sgx.GetDay(9999));
        }
Example #2
0
 public void ShouldGetUrl()
 {
     SgxClient.GetHistoricalUrl(Day._2019_04_04).Should().Be("https://links.sgx.com/1.0.0/securities-historical/5416/SESprice.dat");
     SgxClient.GetHistoricalUrl(Day._2019_04_01).Should().Be("https://links.sgx.com/1.0.0/securities-historical/5413/SESprice.dat");
 }