Search in sources :

Example 1 with Location

use of org.openqa.selenium.html5.Location in project java-client by appium.

the class IOSDriverTest method geolocationTest.

@Test
public void geolocationTest() {
    Location location = new Location(45, 45, 100);
    driver.setLocation(location);
}
Also used : Location(org.openqa.selenium.html5.Location) Test(org.junit.Test)

Example 2 with Location

use of org.openqa.selenium.html5.Location in project ddf by codice.

the class KmlModelToJtsPointConverterTest method assertKmlModelToJtsPoint.

static void assertKmlModelToJtsPoint(Model kmlModel, Point jtsPoint) {
    assertThat(jtsPoint, notNullValue());
    Location location = kmlModel.getLocation();
    KmlToJtsCoordinateConverterTest.assertJtsCoordinatesFromKmlCoordinates(Collections.singletonList(new Coordinate(location.getLongitude(), location.getLatitude(), location.getAltitude())), jtsPoint.getCoordinates());
}
Also used : Coordinate(de.micromata.opengis.kml.v_2_2_0.Coordinate) Location(de.micromata.opengis.kml.v_2_2_0.Location)

Example 3 with Location

use of org.openqa.selenium.html5.Location in project java-client by appium.

the class AndroidDriverTest method geolocationTest.

@Test
public void geolocationTest() {
    Location location = new Location(45, 45, 100);
    driver.setLocation(location);
}
Also used : Location(org.openqa.selenium.html5.Location) Test(org.junit.Test)

Example 4 with Location

use of org.openqa.selenium.html5.Location in project libSBOLj by SynBioDex.

the class SequenceAnnotationTest method test_locationMethods.

@Test
public void test_locationMethods() throws SBOLValidationException {
    Cut promoter_cut = promoter_SA.addCut("promoter_cut", 1);
    assertTrue(gRNA_b_gene.getSequenceAnnotation("promoter_SA").getLocation("promoter_cut").equals(promoter_cut));
    promoter_cut.unsetOrientation();
    assertNull(promoter_cut.getOrientation());
    Location test = promoter_cut;
    assertNotNull(test.toString());
    Cut terminator_cut = terminator_SA.addCut("terminator_cut", 100);
    assertTrue(gRNA_b_gene.getSequenceAnnotation("terminator_SA").getLocation("terminator_cut").equals(terminator_cut));
    Cut gene_cut = gene_SA.addCut("gene_cut", 50, OrientationType.INLINE);
    assertTrue(gRNA_b_gene.getSequenceAnnotation("gene_SA").getLocation("gene_cut").equals(gene_cut));
    gene_SA.removeLocation(gene_cut);
    assertNull(gene_SA.getLocation("gene_cut"));
    Range gene_range = gene_SA.addRange("gene_range", 50, 99);
    assertTrue(gRNA_b_gene.getSequenceAnnotation("gene_SA").getLocation("gene_range").equals(gene_range));
    gene_range.unsetOrientation();
    assertNull(gene_range.getOrientation());
    promoter_SA.removeLocation(promoter_cut);
    assertNull(promoter_SA.getLocation(promoter_cut.getIdentity()));
    GenericLocation promoter_glocation = promoter_SA.addGenericLocation("promoter_glocation");
    assertTrue(gRNA_b_gene.getSequenceAnnotation("promoter_SA").getLocation("promoter_glocation").equals(promoter_glocation));
    terminator_SA.removeLocation(terminator_cut);
    assertNull(terminator_SA.getLocation("terminator_cut"));
    GenericLocation terminator_glocation = terminator_SA.addGenericLocation("terminator_glocation", OrientationType.INLINE);
    assertTrue(gRNA_b_gene.getSequenceAnnotation("terminator_SA").getLocation("terminator_glocation").equals(terminator_glocation));
}
Also used : Cut(org.sbolstandard.core2.Cut) GenericLocation(org.sbolstandard.core2.GenericLocation) Range(org.sbolstandard.core2.Range) GenericLocation(org.sbolstandard.core2.GenericLocation) Location(org.sbolstandard.core2.Location) Test(org.junit.Test)

Example 5 with Location

use of org.openqa.selenium.html5.Location in project libSBOLj by SynBioDex.

the class SequenceAnnotationTest method test_LocToString.

/*
	 * 
	 * move to Location Test class
	 */
@Test
public void test_LocToString() throws SBOLValidationException {
    Location test = promoter_SA.addGenericLocation("promoter_cut");
    assertTrue(test.toString().length() != 0);
    assertNotNull(test.toString());
    assertTrue(test.toString().contains("identity="));
    assertTrue(test.toString().contains("displayId="));
    assertTrue(!test.toString().contains("description="));
    assertTrue(!test.toString().contains("orientation="));
    assertTrue(!test.toString().contains("name="));
}
Also used : GenericLocation(org.sbolstandard.core2.GenericLocation) Location(org.sbolstandard.core2.Location) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)4 Location (de.micromata.opengis.kml.v_2_2_0.Location)2 Location (org.openqa.selenium.html5.Location)2 GenericLocation (org.sbolstandard.core2.GenericLocation)2 Location (org.sbolstandard.core2.Location)2 Coordinate (de.micromata.opengis.kml.v_2_2_0.Coordinate)1 Coordinate (org.locationtech.jts.geom.Coordinate)1 GeometryFactory (org.locationtech.jts.geom.GeometryFactory)1 Cut (org.sbolstandard.core2.Cut)1 Range (org.sbolstandard.core2.Range)1