Esempio n. 1
0
        public async Task Browse_ReturnsListOfFaceShapes()
        {
            // Arrange
            _faceShapesContext = _db.SeedFaceShapesContext();
            List <FaceShapes> expected = _db.FaceShapes;

            // Act
            List <FaceShapes> actual = await _faceShapesContext.Browse();

            // Assert
            Assert.Equal(expected.Count, actual.Count);
        }
Esempio n. 2
0
        public async Task Browse_Limit_Offset_Search_ReturnsFilteredFaceShapes()
        {
            // Arrange
            _faceShapesContext = _db.SeedFaceShapesContext();
            List <FaceShapes> expected = _db.FaceShapes.FindAll(c => c.ShapeName == "oval");

            // Act
            // Equivalent to GET /face_shapes?limit=1000&offset=0&search=oval
            List <FaceShapes> actual = await _faceShapesContext.Browse("1000", "0", "oval");

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