请输入您要查询的百科知识:

 

词条 Cuppa (Java library)
释义

  1. Example of a Cuppa test class

  2. See also

  3. References

  4. External links

{{Orphan|date=August 2016}}{{Infobox software
| name = Cuppa
| logo =
| screenshot =
| caption =
| developer = Joe Bandenburg, Phill Cunnington
| latest release version = 1.0.0[1]
| latest release date = {{release date|2016|03|22}}
| latest preview version =
| latest preview date =
| programming language = Java
| operating system = Cross-platform
| genre = Unit testing tool
| license = Apache 2.0[2]
| website = {{URL|http://cuppa.forgerock.org/}}
}}Cuppa is a behavior-driven development (BDD) unit testing framework for the Java programming language version 8. The framework uses features introduced in version 8 of the language, such as lambdas. It is inspired by Mocha.[3]

Cuppa is linked as a JAR at compile-time; the framework resides under the package org.forgerock.cuppa.

Example of a Cuppa test class

A Cuppa test class is a Java object annotated with the @Test annotation.

import org.forgerock.cuppa.Cuppa.*;

@Test

public class ListTest {

    {        describe("List", () -> {            describe("#indexOf", () -> {                it("returns -1 when the value is not present", () -> {                    List list = Arrays.asList(1, 2, 3);                    assertThat(list.indexOf(5)).isEqualTo(-1);                });            });        });    }

}

See also

  • JUnit, another test framework for Java
  • RSpec, a similar test framework for Ruby
{{Portal|Software Testing|Free and open-source software}}

References

1. ^[https://github.com/cuppa-framework/cuppa/releases Cuppa Releases]
2. ^{{cite web | url=https://github.com/cuppa-framework/cuppa/commit/d200a754fc9a2bbcbe70bf5a546791c02b725240 | title=Add Apache 2.0 License · cuppa-framework/cuppa@d200a75 | publisher=Phill Cunnington | date=17 January 2016 | accessdate=22 March 2016}}
3. ^{{Cite web|url=https://github.com/cuppa-framework/cuppa/blob/8180488f356f52a4f6bd640bd0ce3e1e0b63ed8e/README.md|title=cuppa/README.md at 8180488f356f52a4f6bd640bd0ce3e1e0b63ed8e · cuppa-framework/cuppa|date=2016-01-25|website=GitHub|access-date=2016-03-22}}

External links

  • {{official website|http://cuppa.forgerock.org}}

7 : Cross-platform software|Free software programmed in Java (programming language)|Java development tools|Java platform|Unit testing frameworks|Software using the Apache license|Articles with example Java code

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/23 18:20:30