public void DefaultBoardWithPredefinedLists()
        {
            var boardParams = new BoardCreationParameters();

            boardParams.Name = "Default name";
            boardParams.Desc = "Default desc";

            var createdBoard = BoardService.CreateBoard(boardParams);

            DefaultBoardId = createdBoard.Id;
        }
Exemplo n.º 2
0
        public IActionResult CreateBoard([FromBody] CreateBoardDto createBoardDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var result = _boardService.CreateBoard(createBoardDto);

            return(Ok(result));
        }
Exemplo n.º 3
0
        private async void OnNewBoardClick()
        {
            if (ActiveUser.IsActive == true)
            {
                ShortBoardDTO dto = await BoardService.CreateBoard(ActiveUser.Instance.LoggedUser.Token, new CreateBoardDTO("Unnamed Board"));

                if (dto == null)
                {
                    ShowMessageBox(null, "Creation unsuccessful.");
                }
                else
                {
                    Boards.Add(new ShortBoard(dto));
                }
            }
        }
        public async Task <IActionResult> OnPost()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }
            var boardTitle = Request.Form["create-board-title"];

            Board board = new Board(boardTitle);

            board = await _service.CreateBoard(board);

            return(RedirectToPage("/BoardPages/ViewBoard", new
            {
                id = board.Id
            }));
        }
Exemplo n.º 5
0
        public void Should_CreateBoard()
        {
            List <List <int> > retVal = BoardService.CreateBoard();

            int x = 2;
        }