2 * Copyright (c) 2016 Huawei, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.nemo.tool.sandbox.northbound;
10 import junit.framework.TestCase;
11 import org.junit.Assert;
12 import org.junit.Before;
13 import org.junit.Test;
15 import static org.junit.Assert.*;
18 * Created by zhangmeng on 2016/1/14.
20 public class ExecuteRequestTest extends TestCase {
21 private ExecuteRequest executeRequest;
23 public void setUp() throws Exception {
24 executeRequest = new ExecuteRequest();
28 public void testGet_Set() throws Exception {
29 Assert.assertTrue(executeRequest.getHostName() == null);
30 executeRequest.setHostName("test");
31 Assert.assertTrue(executeRequest.getHostName().equals("test"));
33 Assert.assertTrue(executeRequest.getCommand() == null);
34 executeRequest.setCommand("command");
35 Assert.assertTrue(executeRequest.getCommand().equals("command"));
38 Assert.assertTrue(executeRequest.toString().equals("ExecuteRequest{" +
39 "hostName='" + "test" + '\'' +
40 ", command='" + "command" + '\'' +