zoukankan      html  css  js  c++  java
  • JUnit4 入门笔记

    Test注解的两个可选参数 expected timeout

    The Test annotation supports two optional parameters.
      The first, expected, declares that a test method should throw an exception.
      If it doesn't throw an exception or if it throws a different exception than the one declared, the test fails.

    @Test(expected = Exception.class)
    	public void Test() {
    }
    

    The second optional parameter, timeout, causes a test to fail if it takes longer than a specified amount of clock time (measured in milliseconds).

    @Test(timeout = 1000)
    	public void Test() {
    }
    
  • 相关阅读:
    jquery的文档操作
    Websocket简介
    第二次作业
    第一次作业
    本地存储
    轮播图制作
    BOM
    小案例总结
    Web API——DOM
    Web APIs(DOM、BOM)综述
  • 原文地址:https://www.cnblogs.com/vincenshen/p/10427839.html
Copyright © 2011-2022 走看看