public async Task GetAllIntrests_Should_Return_Success_Result()
        {
            var interestRepository = new InterestRepository(_pearUpContext);
            var result             = await interestRepository.GetAllInterests();

            result.IsSuccessed.Should().BeTrue();
            result.Value.Should().BeEquivalentTo(_interestsList);
        }
Esempio n. 2
0
        public ActionResult GetAllInterestsForUser(int userId)
        {
            var listOfInterests = _interestRepository.GetAllInterests(userId);

            return(Ok(listOfInterests));
        }
        public ActionResult GetAllInterests()
        {
            var interestList = InterestRepository.GetAllInterests();

            return(Created($"api/getAllInterests", interestList));
        }