@@ -517,87 +517,6 @@ public void testAccountLink() throws IOException {
517517 .isEqualTo ("xxxxxxxxxxxxxxx" );
518518 });
519519 }
520-
521- @ Test
522- public void testLineThingsLink () throws IOException {
523- parse ("callback/line-things-link.json" , callbackRequest -> {
524- Assertions .assertThat (callbackRequest .events ()).hasSize (1 );
525- final ThingsEvent event = (ThingsEvent ) callbackRequest .events ().get (0 );
526- assertThat (event ).isInstanceOf (ThingsEvent .class );
527- Assertions .assertThat (event .source ()).isInstanceOf (UserSource .class );
528- Assertions .assertThat (event .source ().userId ()).isEqualTo ("U012345678901234567890123456789ab" );
529- Assertions .assertThat (event .timestamp ()).isEqualTo (1462629479859L );
530- Assertions .assertThat (event .mode ())
531- .isEqualTo (EventMode .ACTIVE );
532-
533- final LinkThingsContent things = (LinkThingsContent ) event .things ();
534- Assertions .assertThat (things .deviceId ()).isEqualTo ("t016560bc3fb1e42b9fe9293ca6e2db71" );
535- });
536- }
537-
538- @ Test
539- public void testLineThingsUnlink () throws IOException {
540- parse ("callback/line-things-unlink.json" , callbackRequest -> {
541- Assertions .assertThat (callbackRequest .events ()).hasSize (1 );
542- final ThingsEvent event = (ThingsEvent ) callbackRequest .events ().get (0 );
543- assertThat (event ).isInstanceOf (ThingsEvent .class );
544- Assertions .assertThat (event .source ()).isInstanceOf (UserSource .class );
545- Assertions .assertThat (event .source ().userId ()).isEqualTo ("U012345678901234567890123456789ab" );
546- Assertions .assertThat (event .timestamp ()).isEqualTo (1462629479859L );
547- Assertions .assertThat (event .mode ())
548- .isEqualTo (EventMode .ACTIVE );
549-
550- final UnlinkThingsContent things = (UnlinkThingsContent ) event .things ();
551- Assertions .assertThat (things .deviceId ()).isEqualTo ("t016560bc3fb1e42b9fe9293ca6e2db71" );
552- });
553- }
554-
555- @ Test
556- public void testLineThingsScenarioResult () throws IOException {
557- parse ("callback/line-things-scenario-result.json" , callbackRequest -> {
558- Assertions .assertThat (callbackRequest .events ()).hasSize (1 );
559- final ThingsEvent event = (ThingsEvent ) callbackRequest .events ().get (0 );
560- assertThat (event ).isInstanceOf (ThingsEvent .class );
561- Assertions .assertThat (event .source ()).isInstanceOf (UserSource .class );
562- Assertions .assertThat (event .source ().userId ()).isEqualTo ("uXXX" );
563- Assertions .assertThat (event .timestamp ()).isEqualTo (1547817848122L );
564- Assertions .assertThat (event .mode ())
565- .isEqualTo (EventMode .ACTIVE );
566-
567- final ScenarioResultThingsContent things = (ScenarioResultThingsContent ) event .things ();
568- Assertions .assertThat (things .deviceId ()).isEqualTo ("tXXX" );
569-
570- final ScenarioResult result = things .result ();
571- Assertions .assertThat (result .scenarioId ()).isEqualTo ("XXX" );
572- Assertions .assertThat (result .revision ()).isEqualTo (2 );
573- Assertions .assertThat (result .startTime ()).isEqualTo (1547817845950L );
574- Assertions .assertThat (result .endTime ()).isEqualTo (1547817845952L );
575- Assertions .assertThat (result .resultCode ()).isEqualTo ("success" );
576- Assertions .assertThat (result .actionResults ().get (0 ).data ()).isEqualTo ("/w==" );
577- Assertions .assertThat (result .actionResults ().get (0 ).type ()).isEqualTo (ActionResult .Type .BINARY );
578- Assertions .assertThat (result .actionResults ().get (1 ).type ()).isEqualTo (ActionResult .Type .VOID );
579- Assertions .assertThat (result .actionResults ().get (2 ).type ()).isEqualTo (ActionResult .Type .UNDEFINED );
580- Assertions .assertThat (result .bleNotificationPayload ()).isEqualTo ("AQ==" );
581- Assertions .assertThat (result .errorReason ()).isEqualTo (null );
582- });
583- }
584-
585- @ Test
586- public void testLineThingsUnknown () throws IOException {
587- parse ("callback/line-things-unknown.json" , callbackRequest -> {
588- Assertions .assertThat (callbackRequest .events ()).hasSize (1 );
589- final ThingsEvent event = (ThingsEvent ) callbackRequest .events ().get (0 );
590- assertThat (event ).isInstanceOf (ThingsEvent .class );
591- Assertions .assertThat (event .source ()).isInstanceOf (UserSource .class );
592- Assertions .assertThat (event .source ().userId ()).isEqualTo ("U012345678901234567890123456789ab" );
593- Assertions .assertThat (event .timestamp ()).isEqualTo (1462629479859L );
594- Assertions .assertThat (event .mode ())
595- .isEqualTo (EventMode .ACTIVE );
596-
597- Assertions .assertThat (event .things ()).isInstanceOf (UnknownThingsContent .class );
598- });
599- }
600-
601520 @ Test
602521 public void testMemberJoined () throws IOException {
603522 parse ("callback/member_joined.json" , callbackRequest -> {
0 commit comments