public bool IdGeneration_DifferentGenerators_ExpectedResult(int length) { IidGenerator gen; if (length < 20) { gen = new IdGeneratorIBAN(); } else { gen = new IdGeneratorBIC(); } return(length == gen.Generate().Length); }
public bool StorageService_AccountsCreation_ExpectedResult(int length) { AccountOwner owner = new AccountOwner("Kirill", "Fidz"); IidGenerator gen; IPointsCounter counter = new PointsCounter(); if (length == 18) { gen = new IdGeneratorIBAN(); return(length == service.CreateNewAccount(AccountTypes.Basic, owner, gen, counter).Length); } else if (length == 32) { gen = new IdGeneratorBIC(); return(length == service.CreateNewAccount(AccountTypes.Basic, owner, gen, counter).Length); } else { throw new ArgumentException(); } }