コード例 #1
0
 public void PageChangeTest()
 {
     _presentationModel.ResetPage();
     Assert.AreEqual("Total:0元", _presentationModel.GetTotalPriceLabelText());
     Assert.IsTrue(_presentationModel.IsNextPageButtonEnabled());
     Assert.IsFalse(_presentationModel.IsPreviousPageButtonEnabled());
     Assert.AreEqual("Page:1 / 2", _presentationModel.GetPageLabelText());
     Assert.AreEqual("麥香魚\n$49元", _presentationModel.GetOrderButtonText(8));
     Assert.AreEqual("安格斯黑牛堡,大家都愛吃。", _presentationModel.GetMealIntroductionText(0));
     Assert.IsTrue(_presentationModel.IsOrderButtonVisible(8));
     _presentationModel.ChangePage(1);
     Assert.IsFalse(_presentationModel.IsNextPageButtonEnabled());
     Assert.IsTrue(_presentationModel.IsPreviousPageButtonEnabled());
     Assert.AreEqual("Page:2 / 2", _presentationModel.GetPageLabelText());
     Assert.AreEqual(null, _presentationModel.GetOrderButtonText(8));
     Assert.IsFalse(_presentationModel.IsOrderButtonVisible(8));
     _presentationModel.GetMealButtonImagePath(0);
     _presentationModel.GetMealButtonImagePath(8);
     _presentationModel.ChangePage(2);
     Assert.AreEqual("Page:1 / 2", _presentationModel.GetPageLabelText());
 }