summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/telemetry/HttpTransportTest.java
blob: 5b54496329bd3a83e3902a4e1dee91a3510e69a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.mapbox.mapboxsdk.telemetry;

import org.junit.Test;

import static com.mapbox.services.android.telemetry.utils.TelemetryUtils.toHumanReadableAscii;
import static junit.framework.Assert.assertEquals;

public class HttpTransportTest {

  @Test
  public void testNonAsciiUserAgent() {

    final String swedishUserAgent = "Sveriges Fjäll/1.0/1 MapboxEventsAndroid/4.0.0-SNAPSHOT";
    final String asciiVersion = "Sveriges Fj?ll/1.0/1 MapboxEventsAndroid/4.0.0-SNAPSHOT";

    assertEquals("asciiVersion and swedishUserAgent should match", asciiVersion,
      toHumanReadableAscii(swedishUserAgent));
  }
}