Esempio n. 1
0
        public void AddRangeTest()
        {
            // Arrange
            var mock       = new Mock <ICategoryRepository>();
            var controller = new CategoryController(mock.Object);
            // Act
            var result = controller.AddRange(new List <WebApi.ViewModels.Category>()
            {
                new WebApi.ViewModels.Category()
                {
                    Name = "Category-Test"
                }
            }).Result as OkResult;

            //Assert
            Assert.AreEqual(StatusCodes.Status200OK, result.StatusCode);
        }