Skip to content

Commit

Permalink
Fix CS date to string
Browse files Browse the repository at this point in the history
  • Loading branch information
guperrot committed Oct 4, 2018
1 parent c7f6b00 commit 467c7bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.microsoft.appcenter.ingestion.models.one;

import com.microsoft.appcenter.ingestion.models.json.JSONDateUtils;
import com.microsoft.appcenter.ingestion.models.properties.BooleanTypedProperty;
import com.microsoft.appcenter.ingestion.models.properties.DateTimeTypedProperty;
import com.microsoft.appcenter.ingestion.models.properties.DoubleTypedProperty;
Expand Down Expand Up @@ -127,8 +128,7 @@ public void dateTimeTypedProperty() throws JSONException {
properties.add(property);
PartCUtils.addPartCFromLog(properties, log);
assertEquals(1, log.getData().getProperties().length());
// TODO: Fix this assert.
//assertEquals(new Date(100), JSONDateUtils.toDate(log.getData().getProperties().getString("a")));
assertEquals(new Date(100), JSONDateUtils.toDate(log.getData().getProperties().getString("a")));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.microsoft.appcenter.ingestion.models.one;

import com.microsoft.appcenter.ingestion.models.json.JSONDateUtils;
import com.microsoft.appcenter.ingestion.models.properties.BooleanTypedProperty;
import com.microsoft.appcenter.ingestion.models.properties.DateTimeTypedProperty;
import com.microsoft.appcenter.ingestion.models.properties.DoubleTypedProperty;
Expand Down Expand Up @@ -59,7 +60,7 @@ public static void addPartCFromLog(List<TypedProperty> properties, CommonSchemaL
} else if (property instanceof DoubleTypedProperty) {
value = ((DoubleTypedProperty) property).getValue();
} else if (property instanceof DateTimeTypedProperty) {
value = ((DateTimeTypedProperty) property).getValue();
value = JSONDateUtils.toString(((DateTimeTypedProperty) property).getValue());
} else if (property instanceof BooleanTypedProperty) {
value = ((BooleanTypedProperty) property).getValue();
} else {
Expand Down

0 comments on commit 467c7bd

Please sign in to comment.