package com.accenture.multibank.bank;

import com.accenture.multibank.accounts.AccountType;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author manuel
 * @version 11/30/16
 */
@RunWith(SpringJUnit4ClassRunner.class)
public class RaiffeisenBankTest {
    private Bank raiffeisenBank;
    private int accNr1, accNr2, balance;

    @Before
    public void setUp() throws Exception {
        balance = 1000;
        accNr1 = raiffeisenBank.createAccount(AccountType.SAVING, balance);
        accNr2 = raiffeisenBank.createAccount(AccountType.SAVING, balance);
    }

    @Test(expected = IllegalArgumentException.class)
    public void withdrawWithNegativeValue() throws Exception {
        raiffeisenBank.withdraw(accNr1, -100);
    }

    @Test(expected = IllegalArgumentException.class)
    public void depositWithNegativeValue() throws Exception {
        raiffeisenBank.withdraw(accNr1, -100);
    }

    @Test
    public void name() throws Exception {

    }
}

@@ -166,16 +166,142 @@
 unWith;%0A
+import org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.beans.factory.annotation.Qualifier;%0A
 import o
@@ -486,16 +486,72 @@
 kTest %7B%0A
+    @Autowired%0A    @Qualifier(value = %22RaiffeisenBank%22)%0A
     priv

add autowire