Package org.jboss.test.cmp2.audit.interfaces

Examples of org.jboss.test.cmp2.audit.interfaces.AuditSession


   }

   public void testUpdateAudit()
      throws Exception
   {
      AuditSession audit = getAuditSession();

      long beginCreateTime = System.currentTimeMillis();
      audit.createAudit("updateAudit");
      long endCreateTime = System.currentTimeMillis();
      long beginUpdateTime = System.currentTimeMillis();
      audit.updateAudit("updateAudit", "updateAuditString");
      long endUpdateTime = System.currentTimeMillis();

      String failure = audit.createAuditCheck("updateAudit", "audituser1", beginCreateTime, endCreateTime);
      if (failure != null)
         fail(failure);
      failure = audit.updateAuditCheck("updateAudit", "audituser2", beginUpdateTime, endUpdateTime);
      if (failure != null)
         fail(failure);
   }
View Full Code Here


   }

   public void testUpdateAuditWithClear()
      throws Exception
   {
      AuditSession audit = getAuditSession();

      long beginCreateTime = System.currentTimeMillis();
      audit.createAudit("testUpdateAuditWithClear");
      long endCreateTime = System.currentTimeMillis();
      long beginUpdateTime = System.currentTimeMillis();
      audit.updateAudit("testUpdateAuditWithClear", "testUpdateAuditWithClearUpdate");
      long endUpdateTime = System.currentTimeMillis();

      String failure = audit.createAuditCheck("testUpdateAuditWithClear", "audituser1", beginCreateTime, endCreateTime);
      if (failure != null)
         fail(failure);
      failure = audit.updateAuditCheck("testUpdateAuditWithClear", "audituser2", beginUpdateTime, endUpdateTime);
      if (failure != null)
         fail(failure);
   }
View Full Code Here

   }

   public void testUpdateAuditChangedNames()
      throws Exception
   {
      AuditSession audit = getAuditSession();

      long beginCreateTime = System.currentTimeMillis();
      audit.createAuditChangedNames("updateAudit");
      long endCreateTime = System.currentTimeMillis();
      long beginUpdateTime = System.currentTimeMillis();
      audit.updateAuditChangedNames("updateAudit", "updateAuditString");
      long endUpdateTime = System.currentTimeMillis();

      String failure = audit.createAuditChangedNamesCheck("updateAudit", "audituser1", beginCreateTime, endCreateTime);
      if (failure != null)
         fail(failure);
      failure = audit.updateAuditChangedNamesCheck("updateAudit", "audituser2", beginUpdateTime, endUpdateTime);
      if (failure != null)
         fail(failure);
   }
View Full Code Here

   }

   public void testUpdateAuditMapped()
      throws Exception
   {
      AuditSession audit = getAuditSession();

      long beginCreateTime = System.currentTimeMillis();
      audit.createAuditMapped("updateAudit");
      long endCreateTime = System.currentTimeMillis();
      long beginUpdateTime = System.currentTimeMillis();
      audit.updateAuditMapped("updateAudit", "updateAuditString");
      long endUpdateTime = System.currentTimeMillis();

      String failure = audit.createAuditMappedCheck("updateAudit", "audituser1", beginCreateTime, endCreateTime);
      if (failure != null)
         fail(failure);
      failure = audit.updateAuditMappedCheck("updateAudit", "audituser2", beginUpdateTime, endUpdateTime);
      if (failure != null)
         fail(failure);
   }
View Full Code Here

   }

   public void testCreateAuditMappedChangedFields()
      throws Exception
   {
      AuditSession audit = getAuditSession();

      long beginCreateTime = System.currentTimeMillis();
      audit.createAuditMappedChangedFields("createAuditChangedFields", "myUser", 1234);
      long endCreateTime = System.currentTimeMillis();

      String failure = audit.createAuditMappedCheck("createAuditChangedFields", "myUser", 1234, 1234);
      if (failure != null)
         fail(failure);
      failure = audit.updateAuditMappedCheck("createAuditChangedFields", "audituser1", beginCreateTime, endCreateTime);
      if (failure != null)
         fail(failure);
   }
View Full Code Here

   }

   public void testUpdateAuditMappedChangedFields()
      throws Exception
   {
      AuditSession audit = getAuditSession();

      long beginCreateTime = System.currentTimeMillis();
      audit.createAuditMapped("updateAuditChangedFields");
      long endCreateTime = System.currentTimeMillis();
      audit.updateAuditMappedChangedFields("updateAuditChangedFields", "updateAuditString", "anotherUser", 4567);

      String failure = audit.createAuditMappedCheck("updateAuditChangedFields", "audituser1", beginCreateTime, endCreateTime);
      if (failure != null)
         fail(failure);
      failure = audit.updateAuditMappedCheck("updateAuditChangedFields", "anotherUser", 4567, 4567);
      if (failure != null)
         fail(failure);
   }
View Full Code Here

   public void testScenario1() throws Exception
   {     
      InitialContext ic = new InitialContext();
      FacadeHome fh = (FacadeHome) PortableRemoteObject.narrow(ic.lookup("Facade"), FacadeHome.class);
      Facade facade = fh.create();
      facade.createScenario1();
      facade.deleteBeans();
   }
View Full Code Here

   public void testScenario2() throws Exception
   {     
      InitialContext ic = new InitialContext();
      FacadeHome fh = (FacadeHome) PortableRemoteObject.narrow(ic.lookup("Facade"), FacadeHome.class);
      Facade facade = fh.create();
      facade.createScenario2();
      facade.deleteBeans();
   }
View Full Code Here

   }

   public void testScenario1() throws Exception
   {     
      InitialContext ic = new InitialContext();
      FacadeHome fh = (FacadeHome) PortableRemoteObject.narrow(ic.lookup("Facade"), FacadeHome.class);
      Facade facade = fh.create();
      facade.createScenario1();
      facade.deleteBeans();
   }
View Full Code Here

   }

   public void testScenario2() throws Exception
   {     
      InitialContext ic = new InitialContext();
      FacadeHome fh = (FacadeHome) PortableRemoteObject.narrow(ic.lookup("Facade"), FacadeHome.class);
      Facade facade = fh.create();
      facade.createScenario2();
      facade.deleteBeans();
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.cmp2.audit.interfaces.AuditSession

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.