Azure / azure-notificationhubs-java-backend

Azure Notification Hubs SDK for Java
https://docs.microsoft.com/en-us/azure/notification-hubs/
Apache License 2.0
35 stars 49 forks source link

Assert fail in InstallationParseTest.java fails the build with Maven #6

Closed wesmc7777 closed 6 years ago

wesmc7777 commented 9 years ago

Line 41 in InstallationWnsFull() shown commented out below...

@Test
public void InstallationWnsFull() throws IOException, SAXException, URISyntaxException {
    InputStream inputJson = this.getClass().getResourceAsStream("InstallationWnsFull");     
    Installation installation = Installation.fromJson(inputJson);
    assertNotNull(installation);
    assertEquals("123", installation.getInstallationId());
    assertEquals(NotificationPlatform.Wns, installation.getPlatform());
    assertEquals("wns-push-channel1", installation.getPushChannel());
    assertNotNull(installation.getTemplates());
    assertEquals("<?xml version=\"1.0\" encoding=\"utf-8\"?>", installation.getTemplates().get("template1").getBody());
    Date expiration = installation.getExpirationTime();

    //--> assertTrue(expiration.toString().equalsIgnoreCase("Wed Nov 26 15:34:01 PST 2014"));

    String expectedResultJson = IOUtils.toString(this.getClass().getResourceAsStream("InstallationWnsFullNoSpaces"));   
    String  actualResultJson = installation.toJson();
    assertEquals(expectedResultJson, actualResultJson); 
robatum commented 9 years ago

I already submitted a pull request to fix this issue. See https://github.com/robatum/azure-notificationhubs-java-backend/commit/f075dbf721d0f23edee97829481404f557be1171

abshkd commented 8 years ago

This is fixed in #20