示例#1
0
        public Board CreateBoard(string title, ApplicationUser owner)
        {
            Board my_board = new Board { Title = title, Owner = owner};
            context.Boards.Add(my_board);
            context.SaveChanges(); // This saves something to the Database

            return my_board;
        }
        public void BoardEnsurePropertiesWork()
        {
            //Color color = new Color { Name = "Blue", Value = "#0000ff" };
            // Object Initializer syntax
            Board board = new Board { Title = "My Board" };


            BrelloList brello_list = new BrelloList { Title = "My List" };
            board.Lists.Add(brello_list);

            ApplicationUser a_user = new ApplicationUser();
            board.Followers.Add(a_user);
            

            Assert.AreEqual("My Board", board.Title);
            Assert.AreEqual(1, board.Lists.Count);
            Assert.AreEqual(1, board.Followers.Count);
        }
 public void BoardEnsureICanCreateInstance()
 {
     Board board = new Board();
     Assert.IsNotNull(board);
 }