Package org.hornetq.core.version.impl

Examples of org.hornetq.core.version.impl.VersionImpl


            int incrementingVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.incrementingVersion"));
            String versionSuffix = versionProps.getProperty("hornetq.version.versionSuffix");
            String nettyVersion = versionProps.getProperty("hornetq.netty.version");
            int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("hornetq.version.compatibleVersionList"));

            return new VersionImpl(versionName,
                                   majorVersion,
                                   minorVersion,
                                   microVersion,
                                   incrementingVersion,
                                   versionSuffix,
View Full Code Here


      int minorVersion = 0;
      int microVersion = 1;
      int incrementingVersion = 10;
      String versionSuffix = "suffix";
      String nettyVersion = "netty";
      VersionImpl version = new VersionImpl(versionName,
                                            majorVersion,
                                            minorVersion,
                                            microVersion,
                                            incrementingVersion,
                                            versionSuffix,
                                            nettyVersion);

      Assert.assertEquals(versionName, version.getVersionName());
      Assert.assertEquals(majorVersion, version.getMajorVersion());
      Assert.assertEquals(minorVersion, version.getMinorVersion());
      Assert.assertEquals(microVersion, version.getMicroVersion());
      Assert.assertEquals(incrementingVersion, version.getIncrementingVersion());
      Assert.assertEquals(versionSuffix, version.getVersionSuffix());
   }
View Full Code Here

   }

   public void testEquals() throws Exception
   {
      String nettyVersion = "netty";
      VersionImpl version = new VersionImpl("HORNETQ", 2, 0, 1, 10, "suffix", nettyVersion);
      VersionImpl sameVersion = new VersionImpl("HORNETQ", 2, 0, 1, 10, "suffix", nettyVersion);
      VersionImpl differentVersion = new VersionImpl("HORNETQ", 2, 0, 1, 11, "suffix", nettyVersion);

      Assert.assertFalse(version.equals(new Object()));

      Assert.assertTrue(version.equals(version));
      Assert.assertTrue(version.equals(sameVersion));
View Full Code Here

   }

   public void testSerialize() throws Exception
   {
      String nettyVersion = "netty";
      VersionImpl version = new VersionImpl("uyiuy", 3, 7, 6, 12, "uhuhuh", nettyVersion);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      oos.writeObject(version);
      oos.flush();

      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      ObjectInputStream ois = new ObjectInputStream(bais);
      VersionImpl version2 = (VersionImpl)ois.readObject();

      Assert.assertTrue(version.equals(version2));
   }
View Full Code Here

            int incrementingVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.incrementingVersion"));
            String versionSuffix = versionProps.getProperty("hornetq.version.versionSuffix");
            String nettyVersion = versionProps.getProperty("hornetq.netty.version");
            int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("hornetq.version.compatibleVersionList"));

            return new VersionImpl(versionName,
                                   majorVersion,
                                   minorVersion,
                                   microVersion,
                                   incrementingVersion,
                                   versionSuffix,
View Full Code Here

      int microVersion = 1;
      int incrementingVersion = 10;
      String versionSuffix = "suffix";
      String nettyVersion = "netty";
      int[] compatibleVersionList = {7,8,9,10};
      VersionImpl version = new VersionImpl(versionName,
                                            majorVersion,
                                            minorVersion,
                                            microVersion,
                                            incrementingVersion,
                                            versionSuffix,
                                            nettyVersion,
                                            compatibleVersionList);

      Assert.assertEquals(versionName, version.getVersionName());
      Assert.assertEquals(majorVersion, version.getMajorVersion());
      Assert.assertEquals(minorVersion, version.getMinorVersion());
      Assert.assertEquals(microVersion, version.getMicroVersion());
      Assert.assertEquals(incrementingVersion, version.getIncrementingVersion());
      Assert.assertEquals(versionSuffix, version.getVersionSuffix());
   }
View Full Code Here

   }

   public void testEquals() throws Exception
   {
      String nettyVersion = "netty";
      VersionImpl version = new VersionImpl("HORNETQ", 2, 0, 1, 10, "suffix", nettyVersion, new int[]{7,8,9,10});
      VersionImpl sameVersion = new VersionImpl("HORNETQ", 2, 0, 1, 10, "suffix", nettyVersion, new int[]{7,8,9,10});
      VersionImpl differentVersion = new VersionImpl("HORNETQ", 2, 0, 1, 11, "suffix", nettyVersion, new int[]{7,8,9,10,11});

      Assert.assertFalse(version.equals(new Object()));

      Assert.assertTrue(version.equals(version));
      Assert.assertTrue(version.equals(sameVersion));
View Full Code Here

   }

   public void testSerialize() throws Exception
   {
      String nettyVersion = "netty";
      VersionImpl version = new VersionImpl("uyiuy", 3, 7, 6, 12, "uhuhuh", nettyVersion, new int[]{9,10,11,12});
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      oos.writeObject(version);
      oos.flush();

      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      ObjectInputStream ois = new ObjectInputStream(bais);
      VersionImpl version2 = (VersionImpl)ois.readObject();

      Assert.assertTrue(version.equals(version2));
   }
View Full Code Here

            int incrementingVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.incrementingVersion"));
            String versionSuffix = versionProps.getProperty("hornetq.version.versionSuffix");
            String nettyVersion = versionProps.getProperty("hornetq.netty.version");
            int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("hornetq.version.compatibleVersionList"));

            return new VersionImpl(versionName,
                                   majorVersion,
                                   minorVersion,
                                   microVersion,
                                   incrementingVersion,
                                   versionSuffix,
View Full Code Here

            int microVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.microVersion"));
            int incrementingVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.incrementingVersion"));
            String versionSuffix = versionProps.getProperty("hornetq.version.versionSuffix");
            int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("hornetq.version.compatibleVersionList"));

            return new VersionImpl(versionName,
                                   majorVersion,
                                   minorVersion,
                                   microVersion,
                                   incrementingVersion,
                                   versionSuffix,
View Full Code Here

TOP

Related Classes of org.hornetq.core.version.impl.VersionImpl

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.