Example #1
0
        public void TrackedTypes()
        {
            // create generic tracker for strings
            var gt = new TradeLink.Common.GenericTracker<string>();
            // verify tracked type
            Assert.IsTrue(gt.TrackedType==typeof(string),"wrong type");
            // test other common types
            var gt1 = new TradeLink.Common.GenericTracker<bool>();
            // verify tracked type
            Assert.IsTrue(gt1.TrackedType == typeof(bool), "wrong type");

            var gt2 = new TradeLink.Common.GenericTracker<decimal>();
            // verify tracked type
            Assert.IsTrue(gt2.TrackedType == typeof(decimal), "wrong type");
            var gt3 = new TradeLink.Common.GenericTracker<int>();
            // verify tracked type
            Assert.IsTrue(gt3.TrackedType == typeof(int), "wrong type");

            var gt4 = new TradeLink.Common.GenericTracker<long>();
            // verify tracked type
            Assert.IsTrue(gt4.TrackedType == typeof(long), "wrong type");

            var gt5 = new TradeLink.Common.GenericTracker<object>();
            // verify tracked type
            Assert.IsTrue(gt5.TrackedType == typeof(object), "wrong type");

            var gt6 = new TradeLink.Common.GenericTracker<Order>();
            // verify tracked type
            Assert.IsTrue(gt6.TrackedType == typeof(Order), "wrong type");



        }
        public void TrackedTypes()
        {
            // create generic tracker for strings
            var gt = new TradeLink.Common.GenericTracker <string>();

            // verify tracked type
            Assert.IsTrue(gt.TrackedType == typeof(string), "wrong type");
            // test other common types
            var gt1 = new TradeLink.Common.GenericTracker <bool>();

            // verify tracked type
            Assert.IsTrue(gt1.TrackedType == typeof(bool), "wrong type");

            var gt2 = new TradeLink.Common.GenericTracker <decimal>();

            // verify tracked type
            Assert.IsTrue(gt2.TrackedType == typeof(decimal), "wrong type");
            var gt3 = new TradeLink.Common.GenericTracker <int>();

            // verify tracked type
            Assert.IsTrue(gt3.TrackedType == typeof(int), "wrong type");

            var gt4 = new TradeLink.Common.GenericTracker <long>();

            // verify tracked type
            Assert.IsTrue(gt4.TrackedType == typeof(long), "wrong type");

            var gt5 = new TradeLink.Common.GenericTracker <object>();

            // verify tracked type
            Assert.IsTrue(gt5.TrackedType == typeof(object), "wrong type");

            var gt6 = new TradeLink.Common.GenericTracker <Order>();

            // verify tracked type
            Assert.IsTrue(gt6.TrackedType == typeof(Order), "wrong type");
        }