Пример #1
0
        public void MunicipalityTaxApplicationService_InsertNewMunicipalityTaxFromFile_FalseDataAlreadyExists()
        {
            _municipalityTaxDatabaseAgentMock.Setup(x => x.InsertNewMunicipalityTax(It.IsAny <MunicipalityTax>())).Returns(false);

            var municipalityTaxApplicationService = new MunicipalityTaxApplicationService(_municipalityTaxDatabaseAgentMock.Object);
            var isMunicipalityFromFileInserted    = municipalityTaxApplicationService.InsertNewMunicipalityTaxFromFile();

            Assert.False(isMunicipalityFromFileInserted);
        }
Пример #2
0
        public void MunicipalityTaxApplicationService_InsertNewMunicipalityTaxFromFile_InsertsData()
        {
            _municipalityTaxDatabaseAgentMock.Setup(x => x.InsertNewMunicipalityTax(It.IsAny <MunicipalityTax>())).Returns(true);

            var municipalityTaxApplicationService = new MunicipalityTaxApplicationService(_municipalityTaxDatabaseAgentMock.Object);
            var isMunicipalityFromFileInserted    = municipalityTaxApplicationService.InsertNewMunicipalityTaxFromFile();

            Assert.True(isMunicipalityFromFileInserted);
        }