public void KIRAddBankTest() { //Arrange CKIR KIR = new CKIR(); CBank bank1 = new CBank(KIR); CBank bank2 = new CBank(KIR); KIR.AddBank(bank1); KIR.AddBank(bank2); //Assert Assert.IsTrue(KIR.IsBankExist(bank1)); Assert.IsTrue(KIR.IsBankExist(bank2)); }
public void DI_KIRAddBankTest() { //Arrange CKIR KIR = new CKIR(); var kernel = new StandardKernel(); kernel.Load(Assembly.GetExecutingAssembly()); var bank1 = kernel.Get <IBank>(); var bank2 = kernel.Get <IBank>(); KIR.AddBank(bank1); KIR.AddBank(bank2); //Assert Assert.IsTrue(KIR.IsBankExist(bank1)); Assert.IsTrue(KIR.IsBankExist(bank2)); Assert.IsTrue(bank1.GetType() == typeof(CBank)); }