Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft committed Feb 28, 2024
1 parent b4dff3a commit b7b0b5b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class Float32ValueClientTest {
void get() {
List<Double> response = client.get();
Assertions.assertEquals(1, response.size());
Assertions.assertEquals(42.42, response.get(0));
Assertions.assertEquals(43.125, response.get(0));
}

@Test
void put() {
client.put(Arrays.asList(42.42));
client.put(Arrays.asList(43.125));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class Float32ValueClientTest {
void get() {
Map<String, Double> response = client.get();
Assertions.assertTrue(response.containsKey("k1"));
Assertions.assertEquals(42.42, response.get("k1"));
Assertions.assertEquals(43.125, response.get("k1"));
}

@Test
void put() {
Map<String, Double> map = new HashMap<>();
map.put("k1", 42.42);
map.put("k1", 43.125);
client.put(map);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ public class ExtendsTests {
@Test
public void testExtendsFloat() {
Map<String, Double> propertyMap = new LinkedHashMap<>();
propertyMap.put("prop", 42.42);
ExtendsFloatAdditionalProperties body = new ExtendsFloatAdditionalProperties(42.42);
propertyMap.put("prop", 43.125);
ExtendsFloatAdditionalProperties body = new ExtendsFloatAdditionalProperties(43.125);
body.setAdditionalProperties(propertyMap);
extendsFloatClient.put(body);

ExtendsFloatAdditionalProperties properties = extendsFloatClient.get();
Assertions.assertNotNull(properties);
Assertions.assertNotNull(properties.getAdditionalProperties());
Assertions.assertEquals(42.42, properties.getId());
Assertions.assertEquals(43.125, properties.getId());
Assertions.assertIterableEquals(propertyMap.entrySet(), properties.getAdditionalProperties().entrySet());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public class IsFloatClientTest {

@Test
public void testPullAndGet() {
IsFloatAdditionalProperties body = new IsFloatAdditionalProperties(42.42);
IsFloatAdditionalProperties body = new IsFloatAdditionalProperties(43.125);
Map<String, Double> propertyMap = new LinkedHashMap<>();
propertyMap.put("prop", 42.42);
propertyMap.put("prop", 43.125);
body.setAdditionalProperties(propertyMap);
client.put(body);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class FloatOperationClientTest {
@Test
void get() {
FloatProperty floatProperty = client.get();
Assertions.assertEquals(42.42, floatProperty.getProperty());
Assertions.assertEquals(43.125, floatProperty.getProperty());
}

@Test
void put() {
FloatProperty floatProperty = new FloatProperty(42.42);
FloatProperty floatProperty = new FloatProperty(43.125);
client.put(floatProperty);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void testFloatLiteral() {
floatLiteralClient.put(body);

Assertions.assertNotNull(floatLiteralClient.get());
Assertions.assertEquals(42.42, floatLiteralClient.get().getProperty());
Assertions.assertEquals(43.125, floatLiteralClient.get().getProperty());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public void testUnionStringLiteral() {

@Test
public void testUnionFloatLiteral() {
UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty.FOUR_THREE_FOUR_THREE);
UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty.FOUR_SIX_EIGHT_SEVEN_FIVE);
unionFloatClient.put(body);

Assertions.assertNotNull(unionFloatClient.get());
Assertions.assertEquals(UnionFloatLiteralPropertyProperty.FOUR_THREE_FOUR_THREE, unionFloatClient.get().getProperty());
Assertions.assertEquals(UnionFloatLiteralPropertyProperty.FOUR_SIX_EIGHT_SEVEN_FIVE, unionFloatClient.get().getProperty());
}

@Test
Expand Down

0 comments on commit b7b0b5b

Please sign in to comment.