Examples of origin()


Examples of io.netty.handler.codec.http.cors.CorsConfig.origin()

    @Test
    public void anyOrigin() {
        final CorsConfig cors = withAnyOrigin().build();
        assertThat(cors.isAnyOriginSupported(), is(true));
        assertThat(cors.origin(), is("*"));
        assertThat(cors.origins().isEmpty(), is(true));
    }

    @Test
    public void wildcardOrigin() {
View Full Code Here

Examples of nz.ac.waikato.jdsl.graph.api.InspectableGraph.origin()

    // we must iterate through the edges, because graph.aConnectingEdge
    // does not respect the direction of the edge!
    EdgeIterator iter = graph.edges();
    while (iter.hasNext()) {
      Edge e = iter.nextEdge();
      if (graph.origin(e) == s2 && graph.destination(e) == s0)
        Assert.assertEquals("action0", e.element());
      else if (graph.origin(e) == s2 && graph.destination(e) == s1)
        Assert.assertEquals("action1", e.element());
      else if (graph.origin(e) == s0 && graph.destination(e) == s2)
        Assert.assertEquals("action2", e.element());
View Full Code Here

Examples of nz.ac.waikato.jdsl.graph.api.InspectableGraph.origin()

    EdgeIterator iter = graph.edges();
    while (iter.hasNext()) {
      Edge e = iter.nextEdge();
      if (graph.origin(e) == s2 && graph.destination(e) == s0)
        Assert.assertEquals("action0", e.element());
      else if (graph.origin(e) == s2 && graph.destination(e) == s1)
        Assert.assertEquals("action1", e.element());
      else if (graph.origin(e) == s0 && graph.destination(e) == s2)
        Assert.assertEquals("action2", e.element());
      else
        Assert.assertEquals("actionNone", e.element());
View Full Code Here

Examples of nz.ac.waikato.jdsl.graph.api.InspectableGraph.origin()

      Edge e = iter.nextEdge();
      if (graph.origin(e) == s2 && graph.destination(e) == s0)
        Assert.assertEquals("action0", e.element());
      else if (graph.origin(e) == s2 && graph.destination(e) == s1)
        Assert.assertEquals("action1", e.element());
      else if (graph.origin(e) == s0 && graph.destination(e) == s2)
        Assert.assertEquals("action2", e.element());
      else
        Assert.assertEquals("actionNone", e.element());
    }
  }
View Full Code Here

Examples of nz.ac.waikato.jdsl.graph.api.InspectableGraph.origin()

    // we must iterate through the edges, because graph.aConnectingEdge
    // does not respect the direction of the edge!
    EdgeIterator iter = graph.edges();
    while (iter.hasNext()) {
      Edge e = iter.nextEdge();
      if (graph.origin(e) == s2 && graph.destination(e) == s0)
        assertEquals("action0", e.element());
      else if (graph.origin(e) == s2 && graph.destination(e) == s1)
        assertEquals("action1", e.element());
      else if (graph.origin(e) == s0 && graph.destination(e) == s2)
        assertEquals("action2", e.element());
View Full Code Here

Examples of nz.ac.waikato.jdsl.graph.api.InspectableGraph.origin()

    EdgeIterator iter = graph.edges();
    while (iter.hasNext()) {
      Edge e = iter.nextEdge();
      if (graph.origin(e) == s2 && graph.destination(e) == s0)
        assertEquals("action0", e.element());
      else if (graph.origin(e) == s2 && graph.destination(e) == s1)
        assertEquals("action1", e.element());
      else if (graph.origin(e) == s0 && graph.destination(e) == s2)
        assertEquals("action2", e.element());
      else
        assertEquals("actionNone", e.element());
View Full Code Here

Examples of nz.ac.waikato.jdsl.graph.api.InspectableGraph.origin()

      Edge e = iter.nextEdge();
      if (graph.origin(e) == s2 && graph.destination(e) == s0)
        assertEquals("action0", e.element());
      else if (graph.origin(e) == s2 && graph.destination(e) == s1)
        assertEquals("action1", e.element());
      else if (graph.origin(e) == s0 && graph.destination(e) == s2)
        assertEquals("action2", e.element());
      else
        assertEquals("actionNone", e.element());
    }
  }
View Full Code Here

Examples of nz.ac.waikato.jdsl.graph.api.InspectableGraph.origin()

    // look ahead into the paths that we know about
    // TODO: iterate only over the nodes out of this state
    while (edges.hasNext()) {
      Edge e = edges.nextEdge();
      Object origin = fsmGraph.origin(e).element();
      Object dest = fsmGraph.destination(e).element();
      String actionName = (String) e.element();
      int actionNum = model_.getActionNumber(actionName);
      if (origin.equals(state)) {
        Transition tr = new Transition(origin, (String) e.element(), dest);
View Full Code Here

Examples of org.jboss.aerogear.io.netty.handler.codec.sockjs.handler.CorsMetadata.origin()

public class CorsMetadataTest {

    @Test
    public void nullObjects() {
        final CorsMetadata md = new CorsMetadata(null, null);
        assertThat(md.origin(), equalTo("*"));
        assertThat(md.headers(), is(nullValue()));
        assertThat(md.hasHeaders(), is(false));
    }

    @Test
View Full Code Here

Examples of org.jboss.aerogear.io.netty.handler.codec.sockjs.handler.CorsMetadata.origin()

    }

    @Test
    public void nullOriginString() {
        final CorsMetadata md = new CorsMetadata("null", null);
        assertThat(md.origin(), equalTo("*"));
        assertThat(md.headers(), is(nullValue()));
        assertThat(md.hasHeaders(), is(false));
    }

    @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.