Package org.structr.core.entity

Examples of org.structr.core.entity.TestOne


  public void testSimpleSearchOnRelationship() {

    try {

      final TestOne testOne      = createTestNode(TestOne.class);
      final TestFour testFour    = createTestNode(TestFour.class);
      final Property<Double> key = OneFourOneToOne.doubleProperty;

      assertNotNull(testOne);
      assertNotNull(testFour);
View Full Code Here


 
  public void testSimpleSearchOnRelationship() {
   
    try {

      final TestOne testOne        = createTestNode(TestOne.class);
      final TestFour testFour      = createTestNode(TestFour.class);
      final Property<String> key   = OneFourOneToOne.stringProperty;
     
      assertNotNull(testOne);
      assertNotNull(testFour);
View Full Code Here

    try {

      Property<List<TestOne>> instance = TestSix.manyToManyTestOnes;
      TestSix testSix1  = null;
      TestSix testSix2  = null;
      TestOne testOne1  = null;
      TestOne testOne2  = null;

      testSix1 = createTestNode(TestSix.class);
      testSix2 = createTestNode(TestSix.class);

      testOne1 = createTestNode(TestOne.class);
View Full Code Here

 
  public void testSimpleSearchOnRelationship() {
   
    try {

      final TestOne testOne        = createTestNode(TestOne.class);
      final TestFour testFour      = createTestNode(TestFour.class);
      final Property<Boolean> key = OneFourOneToOne.booleanProperty;
     
      assertNotNull(testOne);
      assertNotNull(testFour);
View Full Code Here

 
  public void test01CompareAscending() {

    try {

      TestOne a = createTestNode(TestOne.class);
      TestOne b = createTestNode(TestOne.class);
     
      try (final Tx tx = app.tx()) {

        GraphObjectComparator comp = new GraphObjectComparator(TestOne.anInt, GraphObjectComparator.ASCENDING);
View Full Code Here

 
  public void test01CompareDescending() {

    try {

      TestOne a = createTestNode(TestOne.class);
      TestOne b = createTestNode(TestOne.class);
     
      GraphObjectComparator comp = new GraphObjectComparator(TestOne.anInt, GraphObjectComparator.DESCENDING);

      try {
        comp.compare(null, null);
View Full Code Here

  public void test01DeleteAfterLookupWithCypherInTransaction() {

    try {

      final TestSix testSix = this.createTestNode(TestSix.class);
      final TestOne testOne = this.createTestNode(TestOne.class);
      SixOneOneToOne rel            = null;

      assertNotNull(testSix);
      assertNotNull(testOne);
     
View Full Code Here

   
  public void test03DeleteDirectly() {

    try {

      final TestOne testOne  = createTestNode(TestOne.class);
      final TestSix testSix  = createTestNode(TestSix.class);
      SixOneOneToOne rel     = null;

      assertNotNull(testOne);
      assertNotNull(testSix);

      try (final Tx tx = app.tx()) {
       
        rel = app.create(testSix, testOne, SixOneOneToOne.class);
        tx.success();
      }

      assertNotNull(rel);

      try (final Tx tx = app.tx()) {
       
        testOne.getRelationships().iterator().next().getRelationship().delete();
        tx.success();
      }

      try (final Tx tx = app.tx()) {
       
View Full Code Here

 
  public void test04DeleteAfterIndexLookup() {

    try {

      final TestOne testOne  = createTestNode(TestOne.class);
      final TestSix testSix  = createTestNode(TestSix.class);
      SixOneOneToOne rel     = null;

      assertNotNull(testOne);
      assertNotNull(testSix);
View Full Code Here

  public void test02CreateNodeWithExistingUuid() {

    try {

      final PropertyMap props = new PropertyMap();
      TestOne node            = null;

      final String uuid = StringUtils.replace(UUID.randomUUID().toString(), "-", "");

      props.put(GraphObject.id, uuid);

      try (final Tx tx = app.tx()) {

        node = app.create(TestOne.class, props);
        tx.success();
      }

      try (final Tx tx = app.tx()) {

        assertTrue(node != null);
        assertTrue(node instanceof TestOne);
        assertEquals(node.getUuid(), uuid);
      }

    } catch (FrameworkException ex) {

      logger.log(Level.SEVERE, ex.toString());
View Full Code Here

TOP

Related Classes of org.structr.core.entity.TestOne

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.