예제 #1
0
        public void AddToy()
        {
            // Create a child
            int   id  = _book.AddChild("Terell");
            Child kid = _book.GetChild(id);

            // Add a toy for the child
            Toy toy = _register.Add("Silly Putty", kid);

            Assert.True(toy.id != 0);
        }
예제 #2
0
        public static void DoAction(ChildRegister registry)
        {
            Console.Clear();

            Console.WriteLine("Enter child name");
            Console.Write("> ");
            string childName = Console.ReadLine();
            int    childId   = registry.AddChild(childName);

            Console.WriteLine(childId);
        }
예제 #3
0
        public void AddChildToRegister()
        {
            Child suzie = new Child();

            suzie.FirstName = "Laura";
            suzie.LastName  = "McDonald";
            suzie.Address   = "123 Main St. USA";

            ChildRegister childRegister = new ChildRegister();

            childRegister.AddChild(suzie);

            Assert.Contains(suzie, childRegister.GetRegister());
        }
예제 #4
0
        public void AddChildToRegister()
        {
            Child suzie = new Child()
            {
                FirstName = "Suzie",
                LastName  = "McDonell",
                Address   = "346 Underdog Way"
            };

            ChildRegister childRegister = new ChildRegister();

            childRegister.AddChild(suzie);

            Assert.Contains(suzie, childRegister.GetRegister());
        }
예제 #5
0
        public void AddChildToRegister()
        {
            Child dude = new Child();

            dude.FirstName = "Dude";
            dude.LastName  = "El Duderino";
            dude.Address   = "Passadena";

            ChildRegister childRegister = new ChildRegister();

            childRegister.AddChild(dude);


            Assert.Contains(dude, childRegister.GetRegister());
        }
예제 #6
0
        public void AddChildren(string child)
        {
            var result = _register.AddChild(child);

            Assert.IsType <int>(result);
        }
        public void AddChildren(string child)
        {
            var result = _register.AddChild(child);

            Assert.True(result);
        }