001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018package org.apache.commons.scxml2.env.javascript; 019 020import org.apache.commons.scxml2.env.SimpleContext; 021import org.junit.Assert; 022import org.junit.Test; 023 024/** 025 * JUnit 3 test case for the JSContext SCXML Context implementation for 026 * the Javascript expression evaluator. 027 * 028 */ 029public class JSContextTest { 030 // TEST CONSTANTS 031 032 // TEST VARIABLES 033 034 // TEST SETUP 035 036 // CLASS METHODS 037 038 /** 039 * Standalone test runtime. 040 * 041 */ 042 public static void main(String args[]) { 043 String[] testCaseName = {JSContextTest.class.getName()}; 044 045 junit.textui.TestRunner.main(testCaseName); 046 } 047 048 // INSTANCE METHOD TESTS 049 050 /** 051 * Tests implementation of JSContext default constructor. 052 * 053 */ 054 @Test 055 public void testDefaultConstructor() { 056 Assert.assertNotNull("Error in JSContext default constructor",new JSContext()); 057 } 058 059 /** 060 * Tests implementation of JSContext 'child' constructor. 061 * 062 */ 063 @Test 064 public void testChildConstructor() { 065 Assert.assertNotNull("Error in JSContext child constructor",new JSContext(new SimpleContext())); 066 } 067 068} 069