/*
 * Licensed 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 org.drausin.bitflow.blockchain.client.config;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

public class BitcoindRpcServiceConfigTest {

    private BitcoindRpcServiceConfig config;
    private String uri;
    private String rpcUser;
    private String rpcPassword;

    @Before
    public final void setUp() throws Exception {

        uri = "http://localhost:0000";
        rpcUser = "auser";
        rpcPassword = "apassword";

        config = new BitcoindRpcServiceConfig(uri, rpcUser, rpcPassword);
    }

    @Test
    public final void testGetUri() throws Exception {
        assertEquals(uri, config.getUri());
    }

    @Test
    public final void testGetRpcUser() throws Exception {
        assertEquals(rpcUser, config.getRpcUser());
    }

    @Test
    public final void testGetRpcPassword() throws Exception {
        assertEquals(rpcPassword, config.getRpcPassword());
    }
}

@@ -633,33 +633,120 @@
 org.
-junit.Assert.assertEquals
+hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertThat
 ;%0A%0Ai
@@ -1592,11 +1592,355 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public final void testEquals() throws Exception %7B%0A        assertThat(config, is(new BitcoindRpcServiceConfig(uri, rpcUser, rpcPassword)));%0A    %7D%0A%0A    @Test%0A    public final void testHashCode() throws Exception %7B%0A        assertEquals((new BitcoindRpcServiceConfig(uri, rpcUser, rpcPassword)).hashCode(), config.hashCode());%0A    %7D
 %0A%7D%0A

add equals and hashCode tests