Exemplo n.º 1
0
        public void TestTravelLikes_0()
        {
            //var conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;User Id=joe;Password=secret;Database=joedata;");
            var db = new DatabaseDbContext();
            var likesRepository = new LikesRepository(db);
            var result          = likesRepository.GetTravelLikesModel(null, 0);

            Assert.IsNotNull(result);
            Assert.AreEqual(LikeStatuses.Neultral, result.UserLikeStatus);
        }
Exemplo n.º 2
0
        public void TestTravelLikes_null()
        {
            //var conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;User Id=joe;Password=secret;Database=joedata;");
            var db = new DatabaseDbContext();
            var likesRepository = new LikesRepository(db);
            var result          = likesRepository.GetTravelLikesModel(null, 14);

            db.Database.Log = Console.WriteLine;
            Console.WriteLine($"Likes: {result.LikesCount}, Dislikes {result.DislikesCount}, User: {result.UserLikeStatus}");
            Assert.IsNotNull(result);
        }