/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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 sample;

import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import sample.HelloWorld;
import static org.junit.Assert.assertEquals;

import org.junit.Test;

public class LoggingTest {

    @Test
    public void testSayHello() {
        NodeFactory nf = NodeFactory.newInstance();
        Node node = nf.createNode((String)null, new String[] {"target/classes"}).start();
        HelloWorld hw = node.getService(HelloWorld.class, "HelloWorld");
        assertEquals("Hello There", hw.sayHello("There"));
    	node.stop();
    }

}
