public void TestCustomsDeclarationGroup() { CustomsDeclarationGroup group = new CustomsDeclarationGroup(); group.AddPerson("abcx"); group.AddPerson("abcy"); group.AddPerson("abcz"); Assert.Equal(6, group.Count()); }
public void TestCustomsDeclarationGroupEveryone() { CustomsDeclarationGroup group = new CustomsDeclarationGroup(); group.AddPerson("abcx"); group.AddPerson("abcy"); group.AddPerson("abcz"); Assert.Equal(3, group.CountWhereEveryone()); }
public static List <CustomsDeclarationGroup> ParseDeclarations(List <string> declarations) { List <CustomsDeclarationGroup> groups = new List <CustomsDeclarationGroup>(); CustomsDeclarationGroup group = new CustomsDeclarationGroup(); foreach (string line in declarations) { if (line == "") { groups.Add(group); group = new CustomsDeclarationGroup(); } else { group.AddPerson(line); } } groups.Add(group); return(groups); }