怎么写RCP UI 的测试用例
1个回答
展开全部
[Test]
public void TestNYStyleCheesePizza()
{
HeadFirstDesignPatterns.Factory.PizzaStore.PizzaStore nyStore =
new NYPizzaStore();
Pizza pizza = nyStore.OrderPizza("cheese");
string pizzaPrepareReturn = "Preparing NY Style Sauce and Cheese Pizza\n" +
"Tossing Thin Crust Dough\n" +
"Adding Martinara Sauce\n" +
"Adding toppings:\n" +
"\tGreated Reggiano Cheese\n";
Assert.AreEqual(pizzaPrepareReturn,pizza.Prepare());
Assert.AreEqual("Bake for 25 minutes at 350 \n",pizza.Bake());
Assert.AreEqual("Cutting the pizza into diagonal slices \n",pizza.Cut());
Assert.AreEqual("Place pizza in official PizzaStore box \n",pizza.Box());
Assert.AreEqual("NY Style Sauce and Cheese Pizza",pizza.GetName());
}
#endregion//TestNYStyleCheesePizza
public void TestNYStyleCheesePizza()
{
HeadFirstDesignPatterns.Factory.PizzaStore.PizzaStore nyStore =
new NYPizzaStore();
Pizza pizza = nyStore.OrderPizza("cheese");
string pizzaPrepareReturn = "Preparing NY Style Sauce and Cheese Pizza\n" +
"Tossing Thin Crust Dough\n" +
"Adding Martinara Sauce\n" +
"Adding toppings:\n" +
"\tGreated Reggiano Cheese\n";
Assert.AreEqual(pizzaPrepareReturn,pizza.Prepare());
Assert.AreEqual("Bake for 25 minutes at 350 \n",pizza.Bake());
Assert.AreEqual("Cutting the pizza into diagonal slices \n",pizza.Cut());
Assert.AreEqual("Place pizza in official PizzaStore box \n",pizza.Box());
Assert.AreEqual("NY Style Sauce and Cheese Pizza",pizza.GetName());
}
#endregion//TestNYStyleCheesePizza
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询