Example #1
0
 public void Setup()
 {
     this.score = new Score
     {
         Id         = 1,
         Points     = 5,
         UserIdFrom = 1,
         UserFrom   = new User {
             Email = "*****@*****.**", Password = "******", Username = "******"
         },
         User = new User {
             Email = "*****@*****.**", Password = "******", Username = "******"
         },
         UserIdTo = 2
     };
     this.scoreRepository = A.Fake <IRepositoryScore>();
     this.userService     = A.Fake <IUserServices>();
     this.scoreService    = new ScoreServices(this.scoreRepository, this.userService);
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScoreServices" /> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="userService">The user service.</param>
 public ScoreServices(IRepositoryScore repository, IUserServices userService)
 {
     this.repository  = repository;
     this.validator   = new ScoreValidator();
     this.userService = userService;
 }