Exemple #1
0
        public async Task Count_ReturnsTotal()
        {
            // Arrange
            _faceShapesContext = _db.SeedFaceShapesContext();
            int expected = _db.FaceShapes.Count;

            // Act
            int actual = await _faceShapesContext.Count();

            // Assert
            Assert.Equal(expected, actual);
        }
Exemple #2
0
        public async Task Count_ReturnsFilteredCount()
        {
            // Arrange
            _faceShapesContext = _db.SeedFaceShapesContext();
            int expected = 1;

            // Act
            // Equivalent to GET /face_shapes/count?search=oval
            int actual = await _faceShapesContext.Count("oval");

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