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); }
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); }
public BarsDataFactory() { this.RtsBars = new NamedObservableCollection <Bar>("RTS-12.13_FT"); this.SiBars = new NamedObservableCollection <Bar>("Si-12.13_FT"); }