Beispiel #1
0
        public void ResetChangesTest1()
        {
            var q = new Quote
            {
                Symbol = "EURUSD",
                Price  = 1.0m
            };
            var store = new QuoteStore();

            store.PushQuote(q);
            q.Price = 2.0m;
            store.PushQuote(q);
            store.ResetChanges();
            var market = store.GetChanges();

            Assert.AreEqual(0, market.Count);
        }
Beispiel #2
0
        public void ResetChangesTest2()
        {
            var q1 = new Quote
            {
                Symbol = "EURUSD",
                Price  = 1.0m
            };
            var q2 = new Quote
            {
                Symbol = "USDJPY",
                Price  = 2.0m
            };
            var store = new QuoteStore();

            store.PushQuote(q1);
            store.ResetChanges();
            store.PushQuote(q2);

            var market = store.GetChanges();

            Assert.AreEqual(1, market.Count);
            Assert.IsTrue(market.Any(quote => quote.Symbol == "USDJPY" && quote.Price == 2.0m));
        }
Beispiel #3
0
        public void ResetChangesTest2()
        {
            var q1 = new Quote
            {
                Symbol = "EURUSD",
                Price = 1.0m
            };
            var q2 = new Quote
            {
                Symbol = "USDJPY",
                Price = 2.0m
            };
            var store = new QuoteStore();
            store.PushQuote(q1);
            store.ResetChanges();
            store.PushQuote(q2);

            var market = store.GetChanges();
            Assert.AreEqual(1, market.Count);
            Assert.IsTrue(market.Any(quote => quote.Symbol == "USDJPY" && quote.Price == 2.0m));
        }
Beispiel #4
0
 public void ResetChangesTest1()
 {
     var q = new Quote
     {
         Symbol = "EURUSD",
         Price = 1.0m
     };
     var store = new QuoteStore();
     store.PushQuote(q);
     q.Price = 2.0m;
     store.PushQuote(q);
     store.ResetChanges();
     var market = store.GetChanges();
     Assert.AreEqual(0, market.Count);
 }