Exemplo n.º 1
0
        public void TestMethod1()
        {
            var cm = new ClockModel();

            cm.Update();
            var cvm = new ClockViewModel();

            cvm.Initialize(cm);
            var cmTest  = cm.CurrentTime;
            var cvmTime = cvm.CurrentTime;

            Assert.AreEqual("7:50", cvmTime);
        }
Exemplo n.º 2
0
        public void ClockViewModelCorrectlyDisplaysAMTime()
        {
            var cm = new MockClockModel();

            cm.MockDateTime = DateTime.Parse("2015-10-30 04:53:13");
            cm.Update();
            var cvm = new ClockViewModel();

            cvm.Initialize(cm);
            var cmTime  = cm.CurrentTime;
            var cvmTime = cvm.CurrentTime;

            Assert.AreEqual("4:53", cvmTime);
        }