public void ReturnListOfChildren() { _register.AddChild("Svetlana"); List <Child> children = _register.GetChildren(); Assert.IsType <List <Child> >(children); Assert.True(children.Count > 0); }
public void ReturnListOfChildren() { List <Child> children = _register.GetChildren(); Assert.IsType <List <Child> >(children); Assert.True(children.Count > 0); int childId = 4; Child child = _register.GetChild(childId); Assert.True(child.childId == childId); }
public static void DoAction(ToyRegister bag, ChildRegister book) { Console.Clear(); Console.WriteLine("Choose child"); List <Child> children = book.GetChildren(); foreach (Child child in children) { Console.WriteLine($"{child.id}. {child.name}"); } Console.Write("> "); string childName = Console.ReadLine(); Child kid = book.GetChild(int.Parse(childName)); Console.WriteLine("Enter toy"); Console.Write("> "); string toyName = Console.ReadLine(); bag.Add(toyName, kid); }
public void ReturnListOfChildren() { var result = _register.GetChildren(); Assert.IsType <List <string> >(result); }