Example #1
0
        public void NamedCollection_test()
        {
            NamedObservableCollection <Bar> bars = new NamedObservableCollection <Bar>("Bar's collection");

            Assert.IsInstanceOfType(bars, typeof(INamed));
            Assert.AreEqual("Bar's collection", bars.Name);
        }
Example #2
0
        public void NamedDataContext_test()
        {
            INamedDataContext factory = new BarsDataFactory();

            IEnumerable <Bar> rts = factory.Get <NamedObservableCollection <Bar> >("RTS-12.13_FT");

            Assert.IsNotNull(rts);

            NamedObservableCollection <Bar> si = factory.Get <NamedObservableCollection <Bar> >("Si-12.13_FT");

            Assert.IsNotNull(si);

            NamedObservableCollection <Bar> gold = factory.Get <NamedObservableCollection <Bar> >("GOLD-12.13_FT");

            Assert.IsNull(gold);
        }
Example #3
0
 public BarsDataFactory()
 {
     this.RtsBars = new NamedObservableCollection <Bar>("RTS-12.13_FT");
     this.SiBars  = new NamedObservableCollection <Bar>("Si-12.13_FT");
 }