Exemplo n.º 1
0
        public void If_Try_To_Insert_Duplicate_Name_Will_RaiseError()
        {
            Library library = new Library();

            library.AddUser(new User("Johny", "John", "Smith"));
            library.AddUser(new User("Johny", "John", "Smith"));
        }
Exemplo n.º 2
0
        public void Create_User_And_Save()
        {
            Library library = new Library();
            User user = new User("Johny", "John", "Smith");
            library.AddUser(user);
            IList<User> users = library.GetUsers();
            Assert.AreEqual(1, users.Count, "Did not get a new user into the Library");

        }
Exemplo n.º 3
0
        public void Can_Get_List_Of_Users()
        {
            Library library = new Library();

            library.AddUser(new User("Johny", "John", "Smith"));
            library.AddUser(new User("Assafgut", "Assaf", "Guterman"));
            library.AddUser(new User("Galitush", "Galit", "Guterman"));

            IList<User> users = library.GetUsers();
            Assert.AreEqual(3, users.Count);
        }