⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 knightoftheroundtabletest.java

📁 Spring in Action 的代码
💻 JAVA
字号:
package com.springinaction.chapter01.knight;import com.springinaction.chapter01.knight.HolyGrail;
import com.springinaction.chapter01.knight.HolyGrailQuest;
import com.springinaction.chapter01.knight.KnightOfTheRoundTable;
import com.springinaction.chapter01.knight.QuestException;

import junit.framework.TestCase;


public class KnightOfTheRoundTableTest extends TestCase {
  public void testEmbarkOnQuest() {
    KnightOfTheRoundTable knight = new KnightOfTheRoundTable("Bedivere");
    
    knight.setQuest(new HolyGrailQuest());
    
    try {
      HolyGrail grail = (HolyGrail) knight.embarkOnQuest();
      
      assertNotNull(grail);
      
      assertTrue(grail.isHoly());
    } catch (QuestException e) {
      fail();
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -