public async void Name_Create_null()
        {
            Mock <ITeamRepository> teamRepository = new Mock <ITeamRepository>();

            teamRepository.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult(new Team()));

            var validator = new ApiTeamServerRequestModelValidator(teamRepository.Object);
            await validator.ValidateCreateAsync(new ApiTeamServerRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, null as string);
        }
        public async void Name_Update_length()
        {
            Mock <ITeamRepository> teamRepository = new Mock <ITeamRepository>();

            teamRepository.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult(new Team()));

            var validator = new ApiTeamServerRequestModelValidator(teamRepository.Object);
            await validator.ValidateUpdateAsync(default(int), new ApiTeamServerRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, new string('A', 129));
        }
        private async void BeUniqueByName_Update_Exists()
        {
            Mock <ITeamRepository> teamRepository = new Mock <ITeamRepository>();

            teamRepository.Setup(x => x.ByName(It.IsAny <string>())).Returns(Task.FromResult <Team>(new Team()));
            var validator = new ApiTeamServerRequestModelValidator(teamRepository.Object);

            await validator.ValidateUpdateAsync(default(int), new ApiTeamServerRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, "A");
        }
        public async void OrganizationId_Create_Invalid_Reference()
        {
            Mock <ITeamRepository> teamRepository = new Mock <ITeamRepository>();

            teamRepository.Setup(x => x.OrganizationByOrganizationId(It.IsAny <int>())).Returns(Task.FromResult <Organization>(null));

            var validator = new ApiTeamServerRequestModelValidator(teamRepository.Object);

            await validator.ValidateCreateAsync(new ApiTeamServerRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.OrganizationId, 1);
        }