forked from MarkusAmshove/Kluent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileBacktick.kt
22 lines (14 loc) · 935 Bytes
/
FileBacktick.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package org.amshove.kluent
import java.io.File
fun File.`should exist`() = this.shouldExist()
fun File.`should not exist`() = this.shouldNotExist()
fun File.`should be dir`() = this.shouldBeDir()
fun File.`should not be dir`() = this.shouldNotBeDir()
fun File.`should be file`() = this.shouldBeFile()
fun File.`should not be file`() = this.shouldNotBeFile()
infix fun File.`should have extension`(other: String) = this shouldHaveExtension(other)
infix fun File.`should not have extension`(other: String) = this shouldNotHaveExtension(other)
infix fun File.`should have name`(other: String) = this shouldHaveName (other)
infix fun File.`should not have name`(other: String) = this shouldNotHaveName (other)
infix fun File.`should contain line with string`(other: String) = this shouldContainLineWithString (other)
infix fun File.`should not contain line with string`(other: String) = this shouldNotContainLineWithString (other)