public void ShouldWorkWithEmptyListAsModel() { IView view = new MockView(); IModel model = new Model(); Presenter presenter = new Presenter(view, model); Assert.IsNull(presenter.CurrentImagePath); presenter.LoadAndShowNextImage(); Assert.IsNull(presenter.CurrentImagePath); }
public void ShouldNumberImagesCorrectly() { IView view = new MockView(); IModel model = new Model(new List <string> { "swap", "zero.txt", "one.jpg", "two.txt", "three.bmp", "another.tiff" }); Presenter presenter = new Presenter(view, model); Assert.AreEqual("1/3", presenter.GetCurrentImagePositionInCollection()); presenter.LoadNextImage().LoadNextImage().LoadNextImage().LoadPreviousImage(); Assert.AreEqual("3/3", presenter.GetCurrentImagePositionInCollection()); }