官术网_书友最值得收藏!

  • Mockito for Spring
  • Sujoy Acharya
  • 233字
  • 2021-07-23 20:37:58

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The messaging module comes with key abstractions from the Spring Integration project such as Message, MessageChannel, and MessageHandler to serve as a foundation for messaging-based applications."

A block of code is set as follows:

  @Test
  public void currencyRoundsOff() throws Exception {
    assertNotNull(CurrencyFormatter.format(100.999));
    assertTrue(CurrencyFormatter.format(100.999).
      contains("$"));
    assertEquals("$101.00", CurrencyFormatter.format(100.999));
  }

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public class LocaleTest {
  private Locale defaultLocale;
  @Before
  public void setUp() {
    defaultLocale = Locale.getDefault();
    Locale.setDefault(Locale.GERMANY);
  }
  @After
  public void restore() {
    Locale.setDefault(defaultLocale);
  }
  @Test
  public void currencyRoundsOff() throws Exception {
    assertEquals("$101.00", CurrencyFormatter.format(100.999));
  }
}

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Right-click on the project; a pop-up menu will appear. Expand the Build Path menu and click on the Configure Build Path menu item."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 元氏县| 金湖县| 信丰县| 尖扎县| 禄劝| 兰考县| 昌图县| 洪江市| 子洲县| 丰都县| 临夏市| 抚远县| 韩城市| 赞皇县| 蓬安县| 抚宁县| 东兰县| 策勒县| 乡城县| 丹凤县| 峨边| 武邑县| 海宁市| 胶南市| 蓝田县| 来凤县| 左云县| 海安县| 新昌县| 建始县| 耿马| 梁平县| 白沙| 砀山县| 和硕县| 榕江县| 双牌县| 响水县| 岑巩县| 东丽区| 西城区|