Skip to content

Commit c95ba8a

Browse files
committed
Represent prices as strings in tests
1 parent d14084f commit c95ba8a

6 files changed

+20
-20
lines changed

src/test/java/com/twilio/type/InboundCallPriceTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public class InboundCallPriceTest extends TypeTest {
1313
@Test
1414
public void testFromJson() throws IOException {
1515
String json = "{\n" +
16-
" \"base_price\": 1.00,\n" +
17-
" \"current_price\": 2.00,\n" +
16+
" \"base_price\": \"1.00\",\n" +
17+
" \"current_price\": \"2.00\",\n" +
1818
" \"type\": \"mobile\"\n" +
1919
"}";
2020

@@ -27,8 +27,8 @@ public void testFromJson() throws IOException {
2727
@Test
2828
public void testFromJsonTollFree() throws IOException {
2929
String json = "{\n" +
30-
" \"base_price\": 1.00,\n" +
31-
" \"current_price\": 2.00,\n" +
30+
" \"base_price\": \"1.00\",\n" +
31+
" \"current_price\": \"2.00\",\n" +
3232
" \"type\": \"toll free\"\n" +
3333
"}";
3434

@@ -41,8 +41,8 @@ public void testFromJsonTollFree() throws IOException {
4141
@Test
4242
public void testFromJsonExtraField() throws IOException {
4343
String json = "{\n" +
44-
" \"base_price\": 1.00,\n" +
45-
" \"current_price\": 2.00,\n" +
44+
" \"base_price\": \"1.00\",\n" +
45+
" \"current_price\": \"2.00\",\n" +
4646
" \"type\": \"toll free\",\n" +
4747
" \"foo\": \"bar\"\n" +
4848
"}";

src/test/java/com/twilio/type/InboundSmsPriceTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public class InboundSmsPriceTest extends TypeTest {
1313
@Test
1414
public void testFromJson() throws IOException {
1515
String json = "{\n" +
16-
" \"base_price\": 1.00,\n" +
17-
" \"current_price\": 2.00,\n" +
16+
" \"base_price\": \"1.00\",\n" +
17+
" \"current_price\": \"2.00\",\n" +
1818
" \"number_type\": \"mobile\"\n" +
1919
"}";
2020

@@ -27,8 +27,8 @@ public void testFromJson() throws IOException {
2727
@Test
2828
public void testFromJsonTollFree() throws IOException {
2929
String json = "{\n" +
30-
" \"base_price\": 1.00,\n" +
31-
" \"current_price\": 2.00,\n" +
30+
" \"base_price\": \"1.00\",\n" +
31+
" \"current_price\": \"2.00\",\n" +
3232
" \"number_type\": \"toll free\"\n" +
3333
"}";
3434

src/test/java/com/twilio/type/OutboundCallPriceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public class OutboundCallPriceTest extends TypeTest {
1313
@Test
1414
public void testFromJson() throws IOException {
1515
String json = "{\n" +
16-
" \"base_price\": 1.00,\n" +
17-
" \"current_price\": 2.00\n" +
16+
" \"base_price\": \"1.00\",\n" +
17+
" \"current_price\": \"2.00\"\n" +
1818
"}";
1919

2020
OutboundCallPrice ocp = fromJson(json, OutboundCallPrice.class);

src/test/java/com/twilio/type/OutboundPrefixPriceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public void testFromJson() throws IOException {
1919
" \"xyz\"\n" +
2020
" ],\n" +
2121
" \"friendly_name\": \"name\",\n" +
22-
" \"base_price\": 1.00,\n" +
23-
" \"current_price\": 2.00\n" +
22+
" \"base_price\": \"1.00\",\n" +
23+
" \"current_price\": \"2.00\"\n" +
2424
"}";
2525

2626
OutboundPrefixPrice opp = fromJson(json, OutboundPrefixPrice.class);

src/test/java/com/twilio/type/OutboundSmsPriceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public void testFromJson() throws IOException {
1919
" \"carrier\": \"att\",\n" +
2020
" \"prices\": [{\n" +
2121
" \"type\": \"local\",\n" +
22-
" \"base_price\": 1.00,\n" +
23-
" \"current_price\": 2.00\n" +
22+
" \"base_price\": \"1.00\",\n" +
23+
" \"current_price\": \"2.00\"\n" +
2424
" }]\n" +
2525
"}";
2626

src/test/java/com/twilio/type/PhoneNumberPriceTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public class PhoneNumberPriceTest extends TypeTest {
1313
@Test
1414
public void testFromJson() throws IOException {
1515
String json = "{\n" +
16-
" \"base_price\": 1.00,\n" +
17-
" \"current_price\": 2.00,\n" +
16+
" \"base_price\": \"1.00\",\n" +
17+
" \"current_price\": \"2.00\",\n" +
1818
" \"number_type\": \"mobile\"\n" +
1919
"}";
2020

@@ -27,8 +27,8 @@ public void testFromJson() throws IOException {
2727
@Test
2828
public void testFromJsonTollFreeType() throws IOException {
2929
String json = "{\n" +
30-
" \"base_price\": 1.00,\n" +
31-
" \"current_price\": 2.00,\n" +
30+
" \"base_price\": \"1.00\",\n" +
31+
" \"current_price\": \"2.00\",\n" +
3232
" \"number_type\": \"toll free\"\n" +
3333
"}";
3434

0 commit comments

Comments
 (0)