public void GetCompetitionsTest()
        {
            TestUtils.AddCompetitionToContext(context);
            var result = controller.GetCompetitions(string.Empty);

            Assert.AreEqual(1, result.Value.Count);
        }
        public void GetCompetitionTest()
        {
            var competition = TestUtils.AddCompetitionToContext(context);
            var result      = controller.GetCompetition(context.competitions.First().id);

            Assert.AreEqual(competition.name, result.Value.name);
        }
        public void DeleteCompetitionTest()
        {
            TestUtils.AddCompetitionToContext(context);
            var result = controller.DeleteCompetition(context.competitions.First().id);

            Assert.AreEqual(0, context.competitions.Count());
            Assert.AreEqual(200, ((StatusCodeResult)result).StatusCode);
        }
        public void UpdateCompetitionTest()
        {
            var competition = TestUtils.AddCompetitionToContext(context);

            competition.edition = "test edition";
            var result = controller.UpdateCompetition(competition);

            Assert.AreEqual(competition.edition, context.competitions.First().edition);
            Assert.AreEqual(200, ((StatusCodeResult)result).StatusCode);
        }
        public void CreateCompetitionBoardTest()
        {
            var competition = TestUtils.AddCompetitionToContext(context);
            var club        = TestUtils.AddClubToContext(context);
            var boards      = new List <CompetitionBoard> {
                new() { competitionId = competition.id, clubId = club.id }
            };
            var result = controller.CreateCompetitionBoard(boards);

            Assert.AreEqual(1, result.Value.Count);
        }