Exemplo n.º 1
0
        public async void GetResultsByUserAsync_GivenInvalidUser_ShouldProduceErrorMessage()
        {
            // arrange
            var mockUnitOfWork    = new Mock <IUnitOfWork>();
            var mockDTOMapper     = new Mock <IDTOMapper>();
            var evaluationService = new EvaluationService(mockUnitOfWork.Object, mockDTOMapper.Object);

            string expected = "username should be alphanumeric";

            // act
            var actual = await evaluationService.GetResultsByUserAsync("@");

            // assert
            Assert.Equal(expected, actual.ErrorMessage);
        }