Search in sources :

Example 1 with PlatformOutput

use of org.n52.io.response.PlatformOutput in project series-rest-api by 52North.

the class PlatformOutputTest method when_havingExplicitHref_then_hrefNotIncludingHrefBase.

@Test
public void when_havingExplicitHref_then_hrefNotIncludingHrefBase() {
    PlatformOutput platform = new PlatformOutput(PlatformType.MOBILE_INSITU);
    platform.setHref("http://localhost/otherContext/12");
    platform.setHrefBase("http://localhost/context");
    platform.setId("12");
    assertThat(platform.getHref(), is("http://localhost/otherContext/12"));
}
Also used : PlatformOutput(org.n52.io.response.PlatformOutput) Test(org.junit.Test)

Example 2 with PlatformOutput

use of org.n52.io.response.PlatformOutput in project series-rest-api by 52North.

the class PlatformOutputTest method when_createdStationaryInsitu_then_hrefIncludesPrefix.

@Test
public void when_createdStationaryInsitu_then_hrefIncludesPrefix() {
    PlatformOutput platform = new PlatformOutput(PlatformType.STATIONARY_INSITU);
    platform.setHrefBase("http://localhost/context");
    platform.setId("12");
    assertThat(platform.getHref(), is("http://localhost/context/stationary_insitu_12"));
}
Also used : PlatformOutput(org.n52.io.response.PlatformOutput) Test(org.junit.Test)

Example 3 with PlatformOutput

use of org.n52.io.response.PlatformOutput in project series-rest-api by 52North.

the class PlatformOutputTest method when_createdMobileInsitu_then_hrefIncludesPrefix.

@Test
public void when_createdMobileInsitu_then_hrefIncludesPrefix() {
    PlatformOutput platform = new PlatformOutput(PlatformType.MOBILE_INSITU);
    platform.setHrefBase("http://localhost/context");
    platform.setId("12");
    assertThat(platform.getHref(), is("http://localhost/context/mobile_insitu_12"));
}
Also used : PlatformOutput(org.n52.io.response.PlatformOutput) Test(org.junit.Test)

Example 4 with PlatformOutput

use of org.n52.io.response.PlatformOutput in project series-rest-api by 52North.

the class PlatformOutputTest method when_createdMobileRemote_then_hrefIncludesPrefix.

@Test
public void when_createdMobileRemote_then_hrefIncludesPrefix() {
    PlatformOutput platform = new PlatformOutput(PlatformType.MOBILE_REMOTE);
    platform.setHrefBase("http://localhost/context");
    platform.setId("12");
    assertThat(platform.getHref(), is("http://localhost/context/mobile_remote_12"));
}
Also used : PlatformOutput(org.n52.io.response.PlatformOutput) Test(org.junit.Test)

Example 5 with PlatformOutput

use of org.n52.io.response.PlatformOutput in project series-rest-api by 52North.

the class PlatformOutputTest method when_createdStationaryRemote_then_hrefIncludesPrefix.

@Test
public void when_createdStationaryRemote_then_hrefIncludesPrefix() {
    PlatformOutput platform = new PlatformOutput(PlatformType.STATIONARY_REMOTE);
    platform.setHrefBase("http://localhost/context");
    platform.setId("12");
    assertThat(platform.getHref(), is("http://localhost/context/stationary_remote_12"));
}
Also used : PlatformOutput(org.n52.io.response.PlatformOutput) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 PlatformOutput (org.n52.io.response.PlatformOutput)6 IoStyleContext (org.n52.io.IoStyleContext)1 IoParameters (org.n52.io.request.IoParameters)1 CategoryOutput (org.n52.io.response.CategoryOutput)1 FeatureOutput (org.n52.io.response.FeatureOutput)1 OfferingOutput (org.n52.io.response.OfferingOutput)1 PhenomenonOutput (org.n52.io.response.PhenomenonOutput)1 ProcedureOutput (org.n52.io.response.ProcedureOutput)1 ServiceOutput (org.n52.io.response.ServiceOutput)1 SeriesParameters (org.n52.io.response.dataset.SeriesParameters)1 QuantityDatasetOutput (org.n52.io.response.dataset.quantity.QuantityDatasetOutput)1