Example #1
0
        public void GetOnline()
        {
            NhibernateService.Instance.DeleteAll<Friend>();

            NhibernateService.Instance.CreateMultiple(_list);

            var allFriends = NhibernateService.Instance.GetAll<Friend>();
            Assert.AreEqual(_list.Count, allFriends.Count());

            var getFriends = new GetFriends(UserId1);
            var expectedFriends = getFriends.GetOnline();
            Assert.AreEqual(1, expectedFriends.Count());

            NhibernateService.Instance.DeleteAll<Friend>();
        }
Example #2
0
 private void LoadFromDB()
 {
     var friends = new GetFriends(_sessionInfoRepo.UserId).GetAll().ToList();
     _friendsRepo.Set(friends, DataSourceType.DB);
 }