Пример #1
0
 public void Setup()
 {
     fakeXmlFeed = new FakeXmlFeed();
     xh          = new XmlHelper(fakeXmlFeed);
     model       = new MainModel(xh);
     fw          = new FileWatcher(model);
 }
Пример #2
0
        public void SetUp()
        {
            fakeXmlFeed = new FakeXmlFeed();
            Api         = Substitute.For <IXmlHelper>();
            Feed        = Substitute.For <IXmlFeed>();
            xmlHelper   = new XmlHelper(fakeXmlFeed);
            model       = new MainModel(xmlHelper);

            Global.ShareSize = 200;
        }
Пример #3
0
        public void TestRemainingShares()
        {
            var fakeXmlFeed1 = new FakeXmlFeed();
            var xmlHelper1   = new XmlHelper(fakeXmlFeed1);
            var model1       = new MainModel(xmlHelper1);

            var remain = model1.RemainingShare(1, 5);

            Assert.AreEqual(4, remain);

            var remain2 = model1.RemainingShare(-150, 500);

            Assert.AreEqual(350, remain2);
        }