Skip to content

Commit

Permalink
additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joke committed Jan 16, 2021
1 parent 7f77906 commit e21917f
Showing 1 changed file with 49 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,54 +16,54 @@ class PersonTest extends Specification {
mockUtil.isMock person
}

// def 'final from subclass is removed'() {
// setup:
// Person.Address address = Mock()
//
// expect:
// mockUtil.isMock address
// }
//
// def 'final from method is removed'() {
// setup:
// Person person = Mock()
//
// when:
// def res = person.firstName
//
// then:
// 1 * person.firstName >> 'Dorothy'
//
// expect:
// res == 'Dorothy'
// }
//
// def 'privat on method is now protected'() {
// setup:
// Person person = Mock()
//
// when:
// def res = person.lastName
//
// then:
// 1 * person.lastName >> 'Gale'
//
// expect:
// res == 'Gale'
// }
//
// def 'final is removed and privat on method is now protected'() {
// setup:
// Person person = Mock()
//
// when:
// def res = person.address.street
//
// then:
// 1 * person.address >> new Person.Address('Yellow Brick Road')
//
// expect:
// res == 'Yellow Brick Road'
// }
def 'final from subclass is removed'() {
setup:
Person.Address address = Mock()

expect:
mockUtil.isMock address
}

def 'final from method is removed'() {
setup:
Person person = Mock()

when:
def res = person.firstName

then:
1 * person.firstName >> 'Dorothy'

expect:
res == 'Dorothy'
}

def 'privat on method is now protected'() {
setup:
Person person = Mock()

when:
def res = person.lastName

then:
1 * person.lastName >> 'Gale'

expect:
res == 'Gale'
}

def 'final is removed and privat on method is now protected'() {
setup:
Person person = Mock()

when:
def res = person.address.street

then:
1 * person.address >> new Person.Address('Yellow Brick Road')

expect:
res == 'Yellow Brick Road'
}

}

0 comments on commit e21917f

Please sign in to comment.