Skip to content

Commit d38b21d

Browse files
authored
Bye line things (#1694)
line/line-openapi#112 is a cleanup PR for line things, but it appears to break several tests by deleting this change. Let’s remove those tests beforehand. and more, this change updates our versioning in README. - We'll release changes as a patch version when we close features due to some business reasons. Note we clean up webhook code for line things in another PR.
1 parent 7cc1123 commit d38b21d

File tree

7 files changed

+2
-177
lines changed

7 files changed

+2
-177
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ News: https://developers.line.biz/en/news/
155155
## Versioning
156156

157157
This project respects semantic versioning.
158+
- See https://semver.org/
158159

159-
See http://semver.org/.
160+
However, if a feature that was publicly released is discontinued for business reasons and becomes completely unusable, we will release changes as a patch release.
160161

161162
## From version 7.x
162163

line-bot-webhook/src/test/java/com/linecorp/bot/webhook/model/CallbackRequestTest.java

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -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 -> {

line-bot-webhook/src/test/java/com/linecorp/bot/webhook/model/UnknownFallbackTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public static Stream<Arguments> targets() {
5050
arguments(MessageContent.class, UnknownMessageContent.class),
5151
arguments(ModuleContent.class, UnknownModuleContent.class),
5252
arguments(Source.class, UnknownSource.class),
53-
arguments(ThingsContent.class, UnknownThingsContent.class),
5453
arguments(MembershipContent.class, UnknownMembershipContent.class)
5554
);
5655
}

line-bot-webhook/src/test/resources/callback/line-things-link.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

line-bot-webhook/src/test/resources/callback/line-things-scenario-result.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

line-bot-webhook/src/test/resources/callback/line-things-unknown.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

line-bot-webhook/src/test/resources/callback/line-things-unlink.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)