public RecommendationControllerTests() { _runner = Substitute.For <IUserBasedCollaborativeFiltering>(); _settings = new TestSettings(); _evaluator = Substitute.For <IRecommendationEvaluator>(); _sut = new RecommendationsController(_runner, _settings, _evaluator); }
public void Init() { contextMock = new Mock <MarketplaceContext>(); authorizationServiceMock = new Mock <AuthorizationService>(); queryHelperMock = new Mock <QueryHelper>(); controller = new RecommendationsController( contextMock.Object, authorizationServiceMock.Object, queryHelperMock.Object ); }
public void GetAllRecommendations_CheckHttpStatusCodeWhenAssessmentIdIsNotCorrect() { // Arrange HttpResponseMessage response = new HttpResponseMessage(); response.StatusCode = HttpStatusCode.NoContent; // Act _controller = new RecommendationsController(_unit); _controller.Request = new HttpRequestMessage(); _controller.Configuration = new HttpConfiguration(); int assessmentId = 0; var actualResponce = _controller.GetAllRecommendations(assessmentId); // Assert Assert.AreNotEqual(actualResponce.StatusCode, response.StatusCode); }
public void Setup() { _unit = new UnitOfWork(); _controller = new RecommendationsController(_unit); }
public RecommendationsControllerTests() { _productServiceMock = new Mock <IProductService>(); _subject = new RecommendationsController(_productServiceMock.Object); }
public RecommendationsControllerTests() { _recommendationServiceMock = new Mock <IRecommendationService>(); _subject = new RecommendationsController(_recommendationServiceMock.Object); }
public RecommendationControllerTests() { _spotifyClientMock = new Mock <ISpotifyService>(); _subject = new RecommendationsController(_spotifyClientMock.Object); }