コード例 #1
0
 /// <summary>
 ///     Validation of team information
 /// </summary>
 /// <param name="team">team to validate</param>
 /// <returns>validated team information</returns>
 public static bool ValidateEnteredTeamData(Team team)
 {
     return
         team.Id >= 0 &&
         !string.IsNullOrWhiteSpace(team.Name) &&
         !string.IsNullOrWhiteSpace(team.MetaData) &&
         (team.UserIDs.Length > 0);
 }
コード例 #2
0
 public void Initialize()
 {
     AutoMapperConfigurator.Configure();
     _repositoryMock = new Mock<IRepository<StoredTeam>>();
     _storedTeam = new StoredTeam
     {
         Name = "name",
         MetaData = "metaData",
         Users = new List<StoredUser>
         {
             new StoredUser { Id = 1 },
             new StoredUser { Id = 2 },
             new StoredUser { Id = 3 }       
         } 
     
     };
     _team = new Team {Name = "name", MetaData = "metaData", UserIDs = new[] {1, 2, 3}};
 }