package org.jboss.webbeans.test.examples;

import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;

@Artifact
@BeansXml("beans.xml")
public class MockExampleTest extends AbstractWebBeansTest
{
   
   @Test
   public void testMockSentenceTranslator() throws Exception {
      
      //manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, Production.class, Mock.class));
      
      new RunInDependentContext()
      {
         
         @Override
         protected void execute() throws Exception
         {
            TextTranslator tt2 = manager.getInstanceByType(TextTranslator.class);
            assert "Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.".equals( tt2.translate("Hello world. How's tricks?") );
         }
         
      }.run();  
   }
   
}

package org.jboss.webbeans.test.examples;

import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;

@Artifact
@BeansXml("beans.xml")
public class MockExampleTest extends AbstractWebBeansTest
{
   
   @Test
   public void testMockSentenceTranslator() throws Exception 
   {   
      
      new RunInDependentContext()
      {
         
         @Override
         protected void execute() throws Exception
         {
            TextTranslator tt2 = manager.getInstanceByType(TextTranslator.class);
            assert "Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.".equals( tt2.translate("Hello world. How's tricks?") );
         }
         
      }.run();  
   }
   
}

tidy up