예제 #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"));
        }
예제 #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");

        }
예제 #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);
        }