Ejemplo n.º 1
0
        public void GetUserHistoryCountByUserId_InvalidArgument(int userId)
        {
            // Arrange
            SOVAContext           databaseContext       = new SOVAContext(_connectionString);
            UserHistoryRepository userHistoryRepository = new UserHistoryRepository(databaseContext);

            // Act
            int count = userHistoryRepository.NoOfUserHistory(userId);

            // Assert
            Assert.Equal(0, count);
        }
Ejemplo n.º 2
0
        public void GetUserHistoryCountByUserId_ValidArgument()
        {
            // Arrange
            SOVAContext           databaseContext       = new SOVAContext(_connectionString);
            UserHistoryRepository userHistoryRepository = new UserHistoryRepository(databaseContext);

            User testUser = EnsureTestUserExistsThroughContext_ReturnsTestUser();

            // Act
            int count = userHistoryRepository.NoOfUserHistory(testUser.Id);

            // Assert
            Assert.True(count > -1);
        }