🎨 WxMpSubscribeMessage实现序列化接口

This commit is contained in:
giveup 2025-01-24 21:26:02 +08:00 committed by GitHub
parent c3b16228c0
commit d65e2f27a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -17,7 +17,7 @@ import java.util.Map;
@NoArgsConstructor
@Builder
@AllArgsConstructor
public class WxMpSubscribeMessage {
public class WxMpSubscribeMessage implements Serializable {
/**
* 接收者openid.

View File

@ -2,6 +2,9 @@ package me.chanjar.weixin.mp.bean.subscribe;
import org.testng.annotations.*;
import java.io.Serializable;
import java.util.Arrays;
import static org.testng.AssertJUnit.*;
/**
@ -43,4 +46,9 @@ public class WxMpSubscribeMessageTest {
assertEquals(message.toJson(), actual);
}
@Test
void testWxMpSubscribeMessageIsSerializable() {
assertTrue(Arrays.stream(WxMpSubscribeMessage.class.getInterfaces()).anyMatch(anInterface -> anInterface.isInstance(Serializable.class)));
}
}