Skip to content

Commit

Permalink
Merge pull request #57 from rabestro/chore/not-null
Browse files Browse the repository at this point in the history
Refactor StatusCodeSupplierSpec and update pom.xml
  • Loading branch information
Jegors Čemisovs authored Feb 24, 2024
2 parents fb836e9 + 783d337 commit c92bfb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
<include>**/*Test.groovy</include>
<include>**/*IT.groovy</include>
<include>**/*Test.java</include>
<include>**/*Spec.java</include>
<include>**/*IT.java</include>
</includes>
<statelessTestsetReporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ class StatusCodeSupplierSpec extends Specification {
def httpResponse = Mock HttpResponse

@Subject
def statusCodeSupplier = new StatusCodeSupplier(httpClient)
StatusCodeSupplier statusCodeSupplier

void setup() {
statusCodeSupplier = new StatusCodeSupplier(httpClient)
statusCodeSupplier.blogUrl = 'https://localhost'
}

def "should return status code when getAsInt is called"() {
given:
Expand All @@ -33,9 +38,6 @@ class StatusCodeSupplierSpec extends Specification {
statusCodeSupplier.getAsInt()

then:
def exeption = thrown(RuntimeException)

and:
exeption.cause instanceof IOException
thrown RuntimeException
}
}

0 comments on commit c92bfb1

Please sign in to comment.