Ejemplo n.º 1
0
        public void GetAssignmentByIdTagsAsync_InvalidTags_ReturnsNull()
        {
            // Arrange
            var service = new AssignmentService(dbContext);

            string[] tags = new[] { "qwer", "asdf" };

            // Act
            var response = service.GetByTags(tags);

            dbContext.Dispose();

            // Assert
            Assert.True(response.Count() == 0);
        }
Ejemplo n.º 2
0
        public void GetAssignmentByIdTagsAsync_ValidTags_ReturnsAssignment()
        {
            // Arrange
            var service = new AssignmentService(dbContext);

            string[] tags = new[] { "c#", ".Net" };

            // Act
            var response = service.GetByTags(tags);

            dbContext.Dispose();

            // Assert
            Assert.True(response.Count() > 0);
        }