1 /*2 * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.3 */4 package com.tc.object.config;5 6 import com.tc.aspectwerkz.reflect.ClassInfo;7 import com.tc.object.bytecode.aspectwerkz.ClassInfoFactory;8 import com.tc.object.config.schema.InstrumentedClass;9 import com.tc.object.config.schema.TestInstrumentedClass;10 11 import junit.framework.TestCase;12 13 public class InstrumentationDescriptorImplTest extends TestCase {14 15 16 public void testBasics() {17 InstrumentedClass ic = new TestInstrumentedClass();18 TestClassExpressionMatcher em = new TestClassExpressionMatcher();19 InstrumentationDescriptor idi = new InstrumentationDescriptorImpl(ic, em);20 21 String expression = "classExpression";22 ClassInfoFactory classInfoFactory = new ClassInfoFactory();23 ClassInfo classInfo = classInfoFactory.getClassInfo(expression);24 25 em.shouldMatch = false;26 assertFalse(idi.matches(classInfo));27 em.shouldMatch = true;28 assertTrue(idi.matches(classInfo));29 }30 31 }32