Last active
October 14, 2017 23:33
-
-
Save badrinathvm/7c3f0ab3cc8b20d776c8bc1d1d4027d7 to your computer and use it in GitHub Desktop.
Price Validations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("Price validations"){ | |
expect(watch.price).toNot(beNil()) | |
expect(watch.price).to(beTruthy()) | |
//evaluating boundary cases | |
expect(watch.price).toNot(beLessThan(0)) | |
expect(watch.price).to(beCloseTo(11, within: 0.69)) | |
expect(watch.price).to(beLessThanOrEqualTo(11.69)) | |
expect(watch.price).to(beGreaterThan(Double.pi)) | |
expect(watch.price).toNot(beGreaterThan(11.69)) | |
expect(watch.price).toNot(beGreaterThan(Double.infinity)) | |
expect(watch.price).toNot(be(Double.signalingNaN)) | |
expect(watch.price).toNot(be(Double.nan)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment