001 // Copyright May 12, 2006 The Apache Software Foundation 002 // 003 // Licensed under the Apache License, Version 2.0 (the "License"); 004 // you may not use this file except in compliance with the License. 005 // You may obtain a copy of the License at 006 // 007 // http://www.apache.org/licenses/LICENSE-2.0 008 // 009 // Unless required by applicable law or agreed to in writing, software 010 // distributed under the License is distributed on an "AS IS" BASIS, 011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 012 // See the License for the specific language governing permissions and 013 // limitations under the License. 014 package org.apache.tapestry.services; 015 016 import org.apache.hivemind.Registry; 017 import org.apache.tapestry.BaseComponentTestCase; 018 import org.testng.annotations.Test; 019 020 021 /** 022 * 023 * 024 */ 025 @Test 026 public class TestDataSqueezer extends BaseComponentTestCase { 027 028 public void testPipeline() 029 throws Exception 030 { 031 final Registry reg = buildFrameworkRegistry( "squeezer-pipeline.xml" ); 032 final DataSqueezer squeezer = ( DataSqueezer )reg.getService( DataSqueezer.class ); 033 034 final String squeezedValue = squeezer.squeeze( "Hello, World!" ); 035 036 assertTrue( squeezedValue.startsWith( "dummy:" ) ); 037 } 038 }