Ejemplo n.º 1
0
        public void TestGetCallPriceMarketData()
        {
            global::MEFFIntegration.MEFFIntegration wrapper = new global::MEFFIntegration.MEFFIntegration();

            MarketDataQuery mdq = new MarketDataQuery();

            mdq.Ticker         = "BBVA";
            mdq.Date           = new DateTime(2013, 07, 01);
            mdq.Market         = "EU";
            mdq.Field          = "close";
            mdq.MarketDataType = typeof(Fairmat.MarketData.CallPriceMarketData).ToString();
            IMarketData marketData;
            var         status = wrapper.GetMarketData(mdq, out marketData);

            Assert.IsFalse(status.HasErrors);
        }
Ejemplo n.º 2
0
        public void TestRequestOneEntry()
        {
            global::MEFFIntegration.MEFFIntegration wrapper = new global::MEFFIntegration.MEFFIntegration();
            IMarketData     data;
            MarketDataQuery query = new MarketDataQuery();

            query.Ticker         = "GRF";
            query.Date           = new DateTime(2013, 6, 3);
            query.MarketDataType = typeof(Scalar).ToString();
            query.Field          = "close";

            Status status = wrapper.GetMarketData(query, out data);

            Assert.That(!status.HasErrors, status.ErrorMessage);
            Assert.AreEqual(new DateTime(2013, 6, 3), data.TimeStamp);
            Assert.That(data is Scalar);
            Assert.AreEqual(28, (data as Scalar).Value, 1);
        }