Package net.sf.uadetector.datareader

Examples of net.sf.uadetector.datareader.XmlDataReader


  }

  @Test(expected = IllegalNullArgumentException.class)
  public void construct_dataUrl_null() throws MalformedURLException {
    final URL url = new URL("http://localhost");
    new TestDataStore(Data.EMPTY, new XmlDataReader(), CHARSET, null, url);
  }
View Full Code Here


  }

  @Test
  public void construct_successful() {
    final Data data = new DataBlueprint().version("test-version").build();
    final DataReader reader = new XmlDataReader();
    final TestDataStore store = new TestDataStore(data, reader, CHARSET, DATA_URL, VERSION_URL);

    assertThat(store.getData().getVersion()).isEqualTo("test-version");
    assertThat(store.getData()).isSameAs(data);
    assertThat(store.getDataReader()).isEqualTo(reader);
View Full Code Here

  }

  @Test(expected = IllegalNullArgumentException.class)
  public void construct_versionUrl_null() throws MalformedURLException {
    final URL url = new URL("http://localhost");
    new TestDataStore(Data.EMPTY, new XmlDataReader(), CHARSET, url, null);
  }
View Full Code Here

    new TestDataStore(Data.EMPTY, new XmlDataReader(), CHARSET, url, null);
  }

  @Test(expected = IllegalNullArgumentException.class)
  public void readData_charset_null() {
    AbstractDataStore.readData(new XmlDataReader(), DATA_URL, null);
  }
View Full Code Here

    AbstractDataStore.readData(new XmlDataReader(), DATA_URL, null);
  }

  @Test(expected = IllegalNullArgumentException.class)
  public void readData_dataUrl_null() {
    AbstractDataStore.readData(new XmlDataReader(), null, CHARSET);
  }
View Full Code Here

    AbstractDataStore.readData(new XmlDataReader(), null, CHARSET);
  }

  @Test
  public void readData_failsAndReturnsEMPTY() {
    final Data data = AbstractDataStore.readData(new XmlDataReader(), UNREACHABLE_URL, CHARSET);
    assertThat(data).isEqualTo(Data.EMPTY);
  }
View Full Code Here

    AbstractDataStore.readData(null, DATA_URL, CHARSET);
  }

  @Test
  public void readData_successful() {
    final Data data = AbstractDataStore.readData(new XmlDataReader(), DATA_URL, CHARSET);
    assertThat(data.getVersion()).isEqualTo(TestXmlDataStore.VERSION_OLDER);
  }
View Full Code Here

    assertThat(data.getVersion()).isEqualTo(TestXmlDataStore.VERSION_OLDER);
  }

  @Test(expected = IllegalStateException.class)
  public void setData_EMPTY() {
    new TestDataStore(Data.EMPTY, new XmlDataReader(), CHARSET, DATA_URL, VERSION_URL);
  }
View Full Code Here

   */
  private static final String VERSION_URL = AbstractDataStoreTest2.class.getClassLoader().getResource("uas_newer.version").toString();

  @Test(expected = IllegalNullArgumentException.class)
  public void construct_charset_null() throws MalformedURLException {
    new TestDataStore(new XmlDataReader(), DATA_URL, VERSION_URL, null);
  }
View Full Code Here

    new TestDataStore(null, DATA_URL, VERSION_URL, CHARSET);
  }

  @Test(expected = IllegalNullArgumentException.class)
  public void construct_dataUrl_null() throws MalformedURLException {
    new TestDataStore(new XmlDataReader(), null, VERSION_URL, CHARSET);
  }
View Full Code Here

TOP

Related Classes of net.sf.uadetector.datareader.XmlDataReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.