Пример #1
0
 public void Initialization()
 {
     tweetDALRepositoryMock = new Mock <ITweetsRepository>();
     tweetMapper            = new Mock <ITweetMapper>();
     service  = new TweetBL(tweetDALRepositoryMock.Object, tweetMapper.Object);
     newTweet = new Tweet
     {
         UserId   = 3,
         Text     = "This is a unit test4444!",
         PostDate = DateTime.Parse("2016-05-13 14:46:29.387")
     };
     tweetsList = new List <Tweet>
     {
         new Tweet
         {
             Id       = 48,
             UserId   = 58,
             Text     = "This is Didina's First Post!",
             PostDate = DateTime.Parse("2016-05-10 13:50:32.820")
         },
         new Tweet
         {
             Id       = 49,
             UserId   = 61,
             Text     = "This is Eugen's First Post!",
             PostDate = DateTime.Parse("2016-05-10 13:50:47.957")
         },
         new Tweet
         {
             Id       = 50,
             UserId   = 59,
             Text     = "This is Valeriu's First Post!",
             PostDate = DateTime.Parse("2016-05-10 13:51:43.610")
         }
     }.AsQueryable();
 }
Пример #2
0
 public JsonExporterService(ITweetBL tweetBL)
 {
     this.tweetBL = tweetBL;
 }
Пример #3
0
 public TweetController(ITweetBL tweetBl, IUserBL userBl)
 {
     this.tweetBl = tweetBl;
     this.userBl  = userBl;
 }