/*
* Copyright 2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.agila.impl.memory;
import junit.framework.TestCase;
import org.apache.agila.engine.Instance;
import org.apache.agila.model.BusinessProcessID;
import org.apache.agila.services.InstanceServiceInfo;
import java.util.HashMap;
public class InstanceServiceImplTestCase extends TestCase {
private InstanceServiceImpl instanceService;
public void testInternalCreate() {
// TODO add test case
}
public void testInternalSave() {
// TODO add test case
}
public void testInternalGetByID() {
// TODO add test case
}
public void internalListInstanceInfo() {
// TODO add test case
}
public void testInternalInstanceServiceInfo() {
// TODO add test case
}
public void testInstanceCount() {
for( int i = 0; i < 10; i++ ) {
instanceService.internalCreate( new BusinessProcessID( i ), new HashMap() );
}
InstanceServiceInfo instanceSvcInfo = instanceService.getInstanceServiceInfo();
assertEquals( "Number of instances created and are running should be 10", 10, instanceSvcInfo.getNumRunningInstances() );
}
public void setUp() throws Exception {
instanceService = new InstanceServiceImpl();
}
public void tearDown() throws Exception {
instanceService = null;
}
}