Skip to content

Commit

Permalink
add ut
Browse files Browse the repository at this point in the history
  • Loading branch information
lhpqaq committed Jan 26, 2025
1 parent e6b344a commit 7e760e2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@ public class PlatformTypeTest {
@Test
public void testGetPlatforms() {
List<String> senders = PlatformType.getPlatforms();
assertEquals(3, senders.size());
assertEquals(4, senders.size());
assertTrue(senders.contains("openai"));
assertTrue(senders.contains("dashscope"));
assertTrue(senders.contains("qianfan"));
assertTrue(senders.contains("deepseek"));
}

@Test
public void testGetPlatformType() {
assertEquals(PlatformType.OPENAI, PlatformType.getPlatformType("openai"));
assertEquals(PlatformType.DASH_SCOPE, PlatformType.getPlatformType("dashscope"));
assertEquals(PlatformType.QIANFAN, PlatformType.getPlatformType("qianfan"));
assertEquals(PlatformType.DEEPSEEK, PlatformType.getPlatformType("deepseek"));
assertNull(PlatformType.getPlatformType(""));
assertNull(PlatformType.getPlatformType(null));
assertNull(PlatformType.getPlatformType("unknown"));
Expand Down

0 comments on commit 7e760e2

Please sign in to comment.