Skip to content

Commit

Permalink
fix: represent prices as strings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-signal committed Aug 11, 2023
1 parent d14084f commit 3ab9289
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions src/test/java/com/twilio/type/InboundCallPriceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class InboundCallPriceTest extends TypeTest {
@Test
public void testFromJson() throws IOException {
String json = "{\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00,\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\",\n" +
" \"type\": \"mobile\"\n" +
"}";

Expand All @@ -27,8 +27,8 @@ public void testFromJson() throws IOException {
@Test
public void testFromJsonTollFree() throws IOException {
String json = "{\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00,\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\",\n" +
" \"type\": \"toll free\"\n" +
"}";

Expand All @@ -41,8 +41,8 @@ public void testFromJsonTollFree() throws IOException {
@Test
public void testFromJsonExtraField() throws IOException {
String json = "{\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00,\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\",\n" +
" \"type\": \"toll free\",\n" +
" \"foo\": \"bar\"\n" +
"}";
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/twilio/type/InboundSmsPriceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class InboundSmsPriceTest extends TypeTest {
@Test
public void testFromJson() throws IOException {
String json = "{\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00,\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\",\n" +
" \"number_type\": \"mobile\"\n" +
"}";

Expand All @@ -27,8 +27,8 @@ public void testFromJson() throws IOException {
@Test
public void testFromJsonTollFree() throws IOException {
String json = "{\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00,\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\",\n" +
" \"number_type\": \"toll free\"\n" +
"}";

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/twilio/type/OutboundCallPriceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class OutboundCallPriceTest extends TypeTest {
@Test
public void testFromJson() throws IOException {
String json = "{\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\"\n" +
"}";

OutboundCallPrice ocp = fromJson(json, OutboundCallPrice.class);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/twilio/type/OutboundPrefixPriceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public void testFromJson() throws IOException {
" \"xyz\"\n" +
" ],\n" +
" \"friendly_name\": \"name\",\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\"\n" +
"}";

OutboundPrefixPrice opp = fromJson(json, OutboundPrefixPrice.class);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/twilio/type/OutboundSmsPriceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public void testFromJson() throws IOException {
" \"carrier\": \"att\",\n" +
" \"prices\": [{\n" +
" \"type\": \"local\",\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\"\n" +
" }]\n" +
"}";

Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/twilio/type/PhoneNumberPriceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class PhoneNumberPriceTest extends TypeTest {
@Test
public void testFromJson() throws IOException {
String json = "{\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00,\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\",\n" +
" \"number_type\": \"mobile\"\n" +
"}";

Expand All @@ -27,8 +27,8 @@ public void testFromJson() throws IOException {
@Test
public void testFromJsonTollFreeType() throws IOException {
String json = "{\n" +
" \"base_price\": 1.00,\n" +
" \"current_price\": 2.00,\n" +
" \"base_price\": \"1.00\",\n" +
" \"current_price\": \"2.00\",\n" +
" \"number_type\": \"toll free\"\n" +
"}";

Expand Down

0 comments on commit 3ab9289

Please sign in to comment.