NewModelIdentifierStringString.java revision 8729:0242fce0f717
1251881Speter/* 2251881Speter * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. 3251881Speter * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4251881Speter * 5251881Speter * This code is free software; you can redistribute it and/or modify it 6251881Speter * under the terms of the GNU General Public License version 2 only, as 7251881Speter * published by the Free Software Foundation. 8251881Speter * 9251881Speter * This code is distributed in the hope that it will be useful, but WITHOUT 10251881Speter * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11251881Speter * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12251881Speter * version 2 for more details (a copy is included in the LICENSE file that 13251881Speter * accompanied this code). 14251881Speter * 15251881Speter * You should have received a copy of the GNU General Public License version 16251881Speter * 2 along with this work; if not, write to the Free Software Foundation, 17251881Speter * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18251881Speter * 19251881Speter * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20251881Speter * or visit www.oracle.com if you need additional information or have any 21251881Speter * questions. 22251881Speter */ 23251881Speter 24251881Speter/* @test 25251881Speter @summary Test ModelIdentifier(String,String) constructor */ 26251881Speter 27251881Speterimport java.io.File; 28251881Speterimport java.io.FileOutputStream; 29251881Speterimport java.io.IOException; 30251881Speter 31251881Speterimport javax.sound.sampled.*; 32251881Speter 33251881Speterimport com.sun.media.sound.*; 34251881Speter 35251881Speterpublic class NewModelIdentifierStringString { 36251881Speter 37251881Speter public static void main(String[] args) throws Exception { 38251881Speter ModelIdentifier id = new ModelIdentifier("test","a"); 39251881Speter if(!id.getObject().equals("test")) 40251881Speter throw new RuntimeException("id.getObject() doesn't return \"test\"!"); 41251881Speter if(!id.getVariable().equals("a")) 42251881Speter throw new RuntimeException("id.getVariable() doesn't return \"a\"!"); 43251881Speter if(id.getInstance() != 0) 44251881Speter throw new RuntimeException("id.getInstance() doesn't return 0!"); 45251881Speter } 46251881Speter} 47251881Speter