public void DeveGerarExceptionCasoDiasDescansoVazio() { //arrange var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; var diaUtil = new DiaUtil(); //act diaUtil.ProximoDiaDescanso(segunda, new List <DayOfWeek>()); //assert }
public void DeveGerarExceptionCasoFeriadosDiasDescansoVazio() { //arrange var sabado = new DateTime(2018, 03, 17); var diaUtil = new DiaUtil(); //act var ehDiaUtil = diaUtil.EhDiaUtil(sabado, new List <DateTime>(), new List <DayOfWeek>()); //assert }
public void DeveGerarExceptionCasoFeriadosNulo() { //arrange var sabado = new DateTime(2018, 03, 17); var diaUtil = new DiaUtil(); //act diaUtil.ProximoFeriado(sabado); //assert }
public void NaoDeveSerDiaUtilDomingoDiaDescansoPadrao() { //arrange var dataParametro = new DateTime(2018, 01, 07); var diaUtil = new DiaUtil(); //act var naoEhDiaUtil = !diaUtil.EhDiaUtil(dataParametro, DiasUteisTestsInitializer.Feriados); //assert Assert.IsTrue(naoEhDiaUtil); }
public void NaoDeveSerDiaUtilTercaDiaDescansoDiferente() { //arrange var dataParametro = new DateTime(2018, 03, 27); var diaUtil = new DiaUtil(); //act var naoEhDiaUtil = !diaUtil.EhDiaUtil(dataParametro, DiasUteisTestsInitializer.Feriados, DiasUteisTestsInitializer.DiasDescanso); //assert Assert.IsTrue(naoEhDiaUtil); }
public void NaoDeveGerarExceptionCasoFeriadosVazio() { //arrange var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; var diaUtil = new DiaUtil(); //act var ehDiaUtil = diaUtil.EhDiaUtil(segunda, new List <DateTime>()); //assert Assert.IsTrue(ehDiaUtil); }
public void DeveSerDiaUtilDiaDescansoDiferente() { //arrange var dataParametro = new DateTime(2018, 01, 03); var diaUtil = new DiaUtil(); //act var ehDiaUtil = diaUtil.EhDiaUtil(dataParametro, DiasUteisTestsInitializer.Feriados, DiasUteisTestsInitializer.DiasDescanso); //assert Assert.IsTrue(ehDiaUtil); }
public void DeveSerSegundaFeiraAPartirDeSabado() { //arrange var sabado = new DateTime(2018, 03, 24); var diaUtil = new DiaUtil(); //act var proximoDiaUtil = diaUtil.ProximoDiaUtil(sabado); var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; //assert Assert.AreEqual(segunda, proximoDiaUtil); }
public void NaoDeveTerDiaUtilEntreSabadoEDomingo() { //arrange var sabado = new DateTime(2018, 03, 17); var domingo = new DateTime(2018, 03, 18); var diaUtil = new DiaUtil(); //act var numDiasUteis = diaUtil.DiasUteisEntreDatas(sabado, domingo); //assert Assert.AreEqual(0, numDiasUteis); }
public void DeveSerTiradentesAPartirDeMarco() { //arrange var marco = new DateTime(2018, 03, 02); var tiradentes = DiasUteisTestsInitializer.Tiradentes; var diaUtil = new DiaUtil(); //act var proximoFeriado = diaUtil.ProximoFeriado(marco, DiasUteisTestsInitializer.Feriados); //assert Assert.AreEqual(tiradentes, proximoFeriado); }
public void DeveSerSabadoAPartirDeTerca() { //arrange var terca = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Tuesday]; var sabado = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Saturday]; var diaUtil = new DiaUtil(); //act var proximoDiaDescanso = diaUtil.ProximoDiaDescanso(terca); //assert Assert.AreEqual(sabado, proximoDiaDescanso); }
public void DeveSerSabadoAPartirDeSegunda() { //arrange var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; var sabado = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Saturday]; var diaUtil = new DiaUtil(); //act var proximaFolga = diaUtil.ProximaFolga(segunda); //assert Assert.AreEqual(sabado, proximaFolga); }
public void DeveSerConfraternizacaoUniversalApartirDeDezembro() { //arrange var dezembro = new DateTime(2017, 12, 02); var confraternizacaoUniversal = DiasUteisTestsInitializer.ConfraternizacaoUniversal; var diaUtil = new DiaUtil(); //act var proximoFeriado = diaUtil.ProximoFeriado(dezembro, DiasUteisTestsInitializer.Feriados); //assert Assert.AreEqual(confraternizacaoUniversal, proximoFeriado); }
public void DeveTer1DiaUtilEntreDomingoETerca() { //arrange var domingo = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Sunday]; var terca = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Tuesday]; var diaUtil = new DiaUtil(); //act var numDiasUteis = diaUtil.DiasUteisEntreDatas(domingo, terca); //assert Assert.AreEqual(1, numDiasUteis); }
public void DeveTer3DiasUteisEntreDomingoEQuintaFeira() { //arrange var domingo = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Sunday]; var quinta = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Thursday]; var diaUtil = new DiaUtil(); //act var numDiasUteis = diaUtil.DiasUteisEntreDatas(domingo, quinta); //assert Assert.AreEqual(3, numDiasUteis); }
public void DeveSerSegundaFeiraAPartirDeDomingo() { //arrange var domingo = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Sunday]; var diaUtil = new DiaUtil(); //act var proximoDiaUtil = diaUtil.ProximoDiaUtil(domingo); var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; //assert Assert.AreEqual(segunda, proximoDiaUtil); }
public void DeveSerTercaFeiraAPartirDeSegunda() { //arrange var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; var diaUtil = new DiaUtil(); //act var proximoDiaUtil = diaUtil.ProximoDiaUtil(segunda); var terca = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Tuesday]; //assert Assert.AreEqual(terca, proximoDiaUtil); }
public void DeveTer0DiaUtilEntreSegundaETerca() { //arrange var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; var terca = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Tuesday]; var diaUtil = new DiaUtil(); //act var numDiasUteis = diaUtil.DiasUteisEntreDatas(segunda, terca); //assert Assert.AreEqual(0, numDiasUteis); }
public void DeveTer1DiaUtilEntreSabadoETerca() { //arrange var sabado = new DateTime(2018, 03, 24); var terca = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Tuesday]; var diaUtil = new DiaUtil(); //act var numDiasUteis = diaUtil.DiasUteisEntreDatas(sabado, terca); //assert Assert.AreEqual(1, numDiasUteis); }
public void DeveTer10DiasUteisEntreDatas() { //arrange var dataInicio = new DateTime(2018, 03, 01); var dataFim = new DateTime(2018, 03, 16); var diaUtil = new DiaUtil(); //act var numDiasUteis = diaUtil.DiasUteisEntreDatas(dataInicio, dataFim); //assert Assert.AreEqual(10, numDiasUteis); }
public void DeveTer0DiaUtilEntreTercaEQuarta() { //arrange var terca = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Tuesday]; var quarta = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Wednesday]; var diaUtil = new DiaUtil(); //act var numDiasUteis = diaUtil.DiasUteisEntreDatas(terca, quarta); //assert Assert.AreEqual(0, numDiasUteis); }
public void DeveSerQuartaAPartirDeSegundaSeQuartaForFeriado() { //arrange var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; var quarta = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Wednesday]; var diaUtil = new DiaUtil(); //act var proximaFolga = diaUtil.ProximaFolga(segunda, new List <DateTime> { quarta }); //assert Assert.AreEqual(quarta, proximaFolga); }
public void DeveSerQuartaAPartirDeSegundaSeQuartaForDiaDeDescanso() { //arrange var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; var quarta = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Wednesday]; var diaUtil = new DiaUtil(); //act var proximoDiaDescanso = diaUtil.ProximoDiaDescanso(segunda, new List <DayOfWeek> { DayOfWeek.Wednesday }); //assert Assert.AreEqual(quarta, proximoDiaDescanso); }
public void DeveSerQuintaFeiraAPartirDeSegundaSeTercaEQuartaForemFeriados() { //arrange var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday]; var terca = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Tuesday]; var quarta = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Wednesday]; var diaUtil = new DiaUtil(); //act var proximoDiaUtil = diaUtil.ProximoDiaUtil(segunda, new List <DateTime> { terca, quarta }); var quinta = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Thursday]; //assert Assert.AreEqual(quinta, proximoDiaUtil); }
public void CalcularPrimeiroVencimento(int diaUtil) { this.Primeiro_Vencimento = DiaUtil.ObtemDiaUtil(diaUtil); }