Exemplo n.º 1
0
        public void DeleteModel_Pass()
        {
            //Arrange
            var model = GetModel();

            model.ID   = 0;
            datasource = new Mock <ISqliteDataAccess>();
            datasource
            .Setup(m => m.DeleteModel <CrudModel>(model, It.IsAny <string>()))
            .Returns(0);
            //Act
            mockLog = new Mock <ILog>();
            var process  = new DataBaseService(datasource.Object, mockLog.Object);
            var actual   = process.DeleteModel(model);
            var expected = 0;

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