Skip to content

Commit

Permalink
fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
st235 committed Apr 3, 2021
1 parent 94a37ee commit b2edf3b
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,46 +15,46 @@ class MenuItemDescriptorTest {

@Test(expected = IllegalStateException::class)
fun `test that creating empty item will rise an exception`() {
val item = MenuItemDescriptor.BuildRequest(builder, context).create()
val item = MenuItemDescriptor.Builder(context).build()
}

@Test(expected = IllegalStateException::class)
fun `test that creating item with id only will rise an exception`() {
val item = MenuItemDescriptor.BuildRequest(builder, context).id(0).create()
val item = MenuItemDescriptor.Builder(context).id(0).build()
}

@Test(expected = IllegalStateException::class)
fun `test that creating item without color and icon will rise an exception`() {
val item = MenuItemDescriptor.BuildRequest(builder, context).id(0).text("").create()
val item = MenuItemDescriptor.Builder(context).id(0).text("").build()
}

@Test(expected = IllegalStateException::class)
fun `test that creating item without title and icon will rise an exception`() {
val item = MenuItemDescriptor.BuildRequest(builder, context).id(0).color(0).create()
val item = MenuItemDescriptor.Builder(context).id(0).color(0).build()
}

@Test(expected = IllegalStateException::class)
fun `test that creating item without color and text will rise an exception`() {
val item = MenuItemDescriptor.BuildRequest(builder, context).id(0).icon(0).create()
val item = MenuItemDescriptor.Builder(context).id(0).icon(0).build()
}

@Test(expected = IllegalStateException::class)
fun `test that creating item without color will rise an exception`() {
val item = MenuItemDescriptor.BuildRequest(builder, context).id(0).icon(0).text("").create()
val item = MenuItemDescriptor.Builder(context).id(0).icon(0).text("").build()
}

@Test(expected = IllegalStateException::class)
fun `test that creating item without text rise an exception`() {
val item = MenuItemDescriptor.BuildRequest(builder, context).id(0).color(0).icon(0).create()
val item = MenuItemDescriptor.Builder(context).id(0).color(0).icon(0).build()
}

@Test(expected = IllegalStateException::class)
fun `test that creating item without icon will rise an exception`() {
val item = MenuItemDescriptor.BuildRequest(builder, context).id(0).text("").color(0).create()
val item = MenuItemDescriptor.Builder(context).id(0).text("").color(0).build()
}

@Test
fun `test that right created item will not be rise an exception`() {
val item = MenuItemDescriptor.BuildRequest(builder, context).id(1).text("").icon(1).color(1).create()
fun `test that right buildd item will not be rise an exception`() {
val item = MenuItemDescriptor.Builder(context).id(1).text("").icon(1).color(1).build()
}
}

0 comments on commit b2edf3b

Please sign in to comment.