Ceylon.test by Thomáš Hradec

10,604 views
10,451 views

Published on

Discover the Ceylon test framework

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
10,604
On SlideShare
0
From Embeds
0
Number of Embeds
9,797
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ceylon.test by Thomáš Hradec

  1. 1. ceylon.test Tomáš Hradec
  2. 2. Module ceylon.test    framework to write tests integrated into CLI and IDE part of SDK 2
  3. 3. … first test // module descriptor module com.acme "0.1" {     import ceylon.test "1.0.0"; } import ceylon.test { … } test void shouldAlwaysSucceed() { } 3
  4. 4. … assertions test void shouldBeJedi() {     // assert statement     assert(yoda is Jedi,            yoda.midichloriansCount > 1k);     // assert function     assertThatException(()=>yoda.useDarkPower())         .hasType(`ImpossibleException`); } 4
  5. 5. … grouping tests class YodaTest() {     test     void shouldBeJedi() {         ...     }     test     void shouldHavePower() {         ...     } } 5
  6. 6. … initializing tests class YodaTest() {     beforeTest     void pre() => yoda.finishMeditation();     afterTest     void post() => yoda.startMeditation();     ...     } 6
  7. 7. … ignoring tests test ignore("still not implemented") void shouldBeFasterThanLight() {     ... } 7
  8. 8. … demo 8
  9. 9. … next version testSuite({`class YodaTest`,            `class DarthVaderTest`,            `function starOfDeathTestSuite`}) void starwarsTestSuite() {} 9
  10. 10. … next version testListeners({     `class DependencyInjectonTestListener`,     `class TransactionalTestListener`}) package com.acme; testExecutor(`class ArquillianTestExecutor`) package com.acme; 10
  11. 11. Q&A

×