package Ġcom . tel en . easy line up . domain Ċ Ċ import Ġandroid . view . View Ċ import Ġcom . tel en . easy line up . domain . model . Team Creation Step Ċ import Ġcom . tel en . easy line up . domain . use cases . Get Team Creation Next Step Ċ import Ġcom . tel en . easy line up . domain . use cases . Get Team Creation Step Ċ import Ġio . reactivex . ob servers . Test Observer Ċ import Ġorg . junit . Assert Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . mockito . Mockito Annotations Ċ import Ġorg . mockito . junit . Mockito JUnit Runner ĊĊ Ċ @ RunWith ( Mockito JUnit Runner :: class ) Ċ internal Ġclass ĠGet Team Creation Next Step Tests Ġ{ ĊĊĠĠĠ Ġlateinit Ġvar Ġm Get Team Creation Next Step : ĠGet Team Creation Next Step ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġinit () Ġ{ ĊĠĠĠĠĠĠĠ ĠMockito Annotations . init Mocks ( this ) ĊĠĠĠĠĠĠĠ Ġm Get Team Creation Next Step Ġ= ĠGet Team Creation Next Step () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould Trigger An Exception If Step Not Managed () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġobserver Ġ= ĠTest Observer < Get Team Creation Step . Response Value >() ĊĠĠĠĠĠĠĠ Ġm Get Team Creation Next Step . execute UseCase ( Get Team Creation Step . Request Values ( Team Creation Step . FIN ISH )). subscribe ( observer ) ĊĠĠĠĠĠĠĠ Ġobserver . await () ĊĠĠĠĠĠĠĠ Ġobserver . assert Error ( IllegalArgumentException :: class . java ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ// ĠTeam Ġ-> ĠType ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould Return Next Screen Type If Current Is Team () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġobserver Ġ= ĠTest Observer < Get Team Creation Step . Response Value >() ĊĠĠĠĠĠĠĠ Ġm Get Team Creation Next Step . execute UseCase ( Get Team Creation Step . Request Values ( Team Creation Step . TEAM )). subscribe ( observer ) ĊĠĠĠĠĠĠĠ Ġobserver . await () ĊĠĠĠĠĠĠĠ Ġobserver . assert Complete () ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( Team Creation Step . TYPE , Ġobserver . values (). first (). config . next Step ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( true , Ġobserver . values (). first (). config . next Button Enabled ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( R . string . team _ creation _ label _ finish , Ġobserver . values (). first (). config . next Button Label ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( View . VISIBLE , Ġobserver . values (). first (). config . next Button Visibility ) ĊĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( true , Ġobserver . values (). first (). config . previous Button Enabled ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( R . string . team _ creation _ label _ previous , Ġobserver . values (). first (). config . previous Button Label ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( View . VISIBLE , Ġobserver . values (). first (). config . next Button Visibility ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ// ĠType Ġ-> ĠFinish ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould Return Next Screen Finish If Current Is Type () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġobserver Ġ= ĠTest Observer < Get Team Creation Step . Response Value >() ĊĠĠĠĠĠĠĠ Ġm Get Team Creation Next Step . execute UseCase ( Get Team Creation Step . Request Values ( Team Creation Step . TYPE )). subscribe ( observer ) ĊĠĠĠĠĠĠĠ Ġobserver . await () ĊĠĠĠĠĠĠĠ Ġobserver . assert Complete () ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( Team Creation Step . FIN ISH , Ġobserver . values (). first (). config . next Step ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( false , Ġobserver . values (). first (). config . next Button Enabled ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( 0 , Ġobserver . values (). first (). config . next Button Label ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( View . IN VISIBLE , Ġobserver . values (). first (). config . next Button Visibility ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( false , Ġobserver . values (). first (). config . previous Button Enabled ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( 0 , Ġobserver . values (). first (). config . previous Button Label ) ĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( View . IN VISIBLE , Ġobserver . values (). first (). config . previous Button Visibility ) ĊĠĠĠ Ġ} Ċ }