public void BuildByComplexTest() { BankBuilder builder = new SberBankBuilder(); BankBuilderDirector director = new BankBuilderDirector(); Bank sber = client.BuildByComplex(builder, director); Assert.AreEqual($"Сбербанк_{DateTime.Now.ToString("MMddyyyy-HHmm")}", sber.SerialNumber); }
public Bank BuildByComplex(BankBuilder builder, BankBuilderDirector director) { builder = new SberBankBuilder(); director.Construct(builder); return(builder.Bank); }