📄 simpletest.java
字号:
// You can redistribute this software and/or modify it under the terms of// the Ozone Library License version 1 published by ozone-db.org.//// The original code and portions created by SMB are// Copyright (C) 1997-2000 by SMB GmbH. All rights reserved.//// $Id: SimpleTest.java,v 1.4 2000/10/28 16:55:20 daniela Exp $package org.ozoneDB.test.simple;import org.ozoneDB.*;import org.ozoneDB.DxLib.*;import org.ozoneDB.test.*;import test.framework.*;/** * @author <a href="http://www.softwarebuero.de/">SMB</a> * @version $Revision: 1.4 $Date: 2000/10/28 16:55:20 $ */public class SimpleTest extends OzoneTestCase { public static void addSuite( TestSuite suite ) { suite.addTest( new SimpleTest( "testAll" ) ); } public static void main( String[] args ) throws Exception { TestSuite suite = new TestSuite(); suite.addTest( new SimpleTest( "testProxy" ) ); Suite.main( args, suite ); } public SimpleTest( String name ) { super( name ); } public void testAll() throws Exception { Auto auto = (Auto)db.objectForName( "simple1" ); if (auto != null) { debugMsg( "object already exists; deleting..." ); db.deleteObject( auto ); } debugMsg( "creating new object..." ); auto = (Auto)db.createObject( AutoImpl.class.getName(), OzoneInterface.Public, "simple1" ); System.out.println( auto.toString() ); assert( auto.toString().startsWith( "Auto" ) ); auto = (Auto)db.objectForName( "simple1" ); assert( auto.toString().startsWith( "Auto" ) ); } public void testProxy() throws Exception { debugMsg( "creating new object..." ); Auto auto = (Auto)db.createObject( AutoImpl.class.getName() ); Auto auto2 = (Auto)db.createObject( AutoImpl.class.getName() ); auto2.setName( "inner" ); auto.setLink( auto2 ); System.out.println( auto.doSomthing( auto2 ) ); db.deleteObject( auto ); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -