public void ViewModelFactory_CreatesCorrectFrameScores() { List <FrameViewModel> results = ViewModelFactory.CreateFrameViewModels(FrameDataModels).ToList(); Assert.AreEqual(20, results.First().Score); Assert.AreEqual(19, results.ElementAt(1).Score); Assert.AreEqual(9, results.ElementAt(2).Score); Assert.AreEqual(26, results.ElementAt(3).Score); Assert.AreEqual(null, results.ElementAt(4).Score); Assert.AreEqual(null, results.ElementAt(5).Score); }
public void ViewModelFactory_OrdersFramesCorrectly() { List <FrameViewModel> results = ViewModelFactory.CreateFrameViewModels(FrameDataModels).ToList(); Assert.AreEqual(1, results.First().FrameNumber); Assert.AreEqual(2, results.ElementAt(1).FrameNumber); Assert.AreEqual(3, results.ElementAt(2).FrameNumber); Assert.AreEqual(4, results.ElementAt(3).FrameNumber); Assert.AreEqual(5, results.ElementAt(4).FrameNumber); Assert.AreEqual(6, results.ElementAt(5).FrameNumber); }
public void ViewModelFactory_CreatesCorrectFrameStrings() { List <FrameViewModel> results = ViewModelFactory.CreateFrameViewModels(FrameDataModels).ToList(); Assert.AreEqual(new List <char> { '5', '/' }, results.First().Throws); Assert.AreEqual(new List <char> { 'X' }, results.ElementAt(1).Throws); Assert.AreEqual(new List <char> { '1', '8' }, results.ElementAt(2).Throws); Assert.AreEqual(new List <char> { 'X' }, results.ElementAt(3).Throws); Assert.AreEqual(new List <char> { 'X' }, results.ElementAt(4).Throws); Assert.AreEqual(new List <char> { '6' }, results.ElementAt(5).Throws); }