Package tests

Source Code of tests.CommonContextEmptyTest

package tests;

import java.net.URL;

import org.stringtree.finder.FetcherStringFinder;
import org.stringtree.finder.StringFinder;
import org.stringtree.mojasef.HTTPConstants;
import org.stringtree.mojasef.MojasefConstants;
import org.stringtree.mojasef.model.CommonContext;
import org.stringtree.mojasef.model.RemoteSpecCommonContext;
import org.stringtree.util.logging.Logger;

import junit.framework.TestCase;

public class CommonContextEmptyTest extends TestCase {
  CommonContext context;
  StringFinder finder;
 
  public void setUp() {
    context = new RemoteSpecCommonContext((URL)null);
    finder = new FetcherStringFinder(context);
  }
 
  public void testEnvironment() {
    assertEquals(System.getProperty("os.name"), finder.get("os.name"));
  }
 
  public void testDefaults() {
    assertTrue(context.getObject(MojasefConstants.SERVER_LOGGER) instanceof Logger);
    assertEquals("text/html", finder.get(HTTPConstants.RESPONSE_CONTENT_TYPE));
  }
}
TOP

Related Classes of tests.CommonContextEmptyTest

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.