public void Años() { #region Años var retorno = JiraTiempos.Evaluar($"{2 }a"); Assert.AreEqual("2a", retorno); #endregion }
public void Horas() { #region Horas var retorno = JiraTiempos.Evaluar($"{1 }h"); Assert.AreEqual("1h", retorno); #endregion #region Dias retorno = JiraTiempos.Evaluar($"{1 * 8}h"); Assert.AreEqual("1d", retorno); retorno = JiraTiempos.Evaluar($"{1 * 8 + 7 }h"); Assert.AreEqual("1d 7h", retorno); #endregion #region Semanas retorno = JiraTiempos.Evaluar($"{2 * 8 * 5 }h"); Assert.AreEqual("2w", retorno); retorno = JiraTiempos.Evaluar($"{1 * 8 * 5 + 4 * 8 }h"); Assert.AreEqual("1w 4d", retorno); retorno = JiraTiempos.Evaluar($"{1 * 8 * 5 + 4 * 8 + 7}h"); Assert.AreEqual("1w 4d 7h", retorno); #endregion #region Mes retorno = JiraTiempos.Evaluar($"{3 * 8 * 5 * 4}h"); Assert.AreEqual("3M", retorno); retorno = JiraTiempos.Evaluar($"{3 * 8 * 5 * 4 + 2 * 8 * 5 }h"); Assert.AreEqual("3M 2w", retorno); retorno = JiraTiempos.Evaluar($"{3 * 8 * 5 * 4 + 1 * 8 * 5 + 4 * 8 }h"); Assert.AreEqual("3M 1w 4d", retorno); retorno = JiraTiempos.Evaluar($"{3 * 8 * 5 * 4 + 1 * 8 * 5 + 4 * 8 + 7 }h"); Assert.AreEqual("3M 1w 4d 7h", retorno); #endregion #region Años retorno = JiraTiempos.Evaluar($"{2 * 8 * 5 * 4 * 12}h"); Assert.AreEqual("2a", retorno); retorno = JiraTiempos.Evaluar($"{2 * 8 * 5 * 4 * 12 + 3 * 8 * 5 * 4}h"); Assert.AreEqual("2a 3M", retorno); retorno = JiraTiempos.Evaluar($"{2 * 8 * 5 * 4 * 12 + 3 * 8 * 5 * 4 + 2 * 8 * 5 }h"); Assert.AreEqual("2a 3M 2w", retorno); retorno = JiraTiempos.Evaluar($"{2 * 8 * 5 * 4 * 12 + 3 * 8 * 5 * 4 + 1 * 8 * 5 + 4 * 8 }h"); Assert.AreEqual("2a 3M 1w 4d", retorno); retorno = JiraTiempos.Evaluar($"{2 * 8 * 5 * 4 * 12 + 3 * 8 * 5 * 4 + 1 * 8 * 5 + 4 * 8 + 7 }h"); Assert.AreEqual("2a 3M 1w 4d 7h", retorno); #endregion }
public void Meses() { #region Meses var retorno = JiraTiempos.Evaluar($"{2}M"); Assert.AreEqual("2M", retorno); #endregion #region Años retorno = JiraTiempos.Evaluar($"{2 * 12}M"); Assert.AreEqual("2a", retorno); retorno = JiraTiempos.Evaluar($"{2 * 12 + 3 }M"); Assert.AreEqual("2a 3M", retorno); #endregion }
public void Dias() { #region Dias var retorno = JiraTiempos.Evaluar($"{1 }d"); Assert.AreEqual("1d", retorno); #endregion #region Semanas retorno = JiraTiempos.Evaluar($"{2 * 5 }d"); Assert.AreEqual("2w", retorno); retorno = JiraTiempos.Evaluar($"{1 * 5 + 4 }d"); Assert.AreEqual("1w 4d", retorno); #endregion #region Mes retorno = JiraTiempos.Evaluar($"{3 * 5 * 4}d"); Assert.AreEqual("3M", retorno); retorno = JiraTiempos.Evaluar($"{3 * 5 * 4 + 2 * 5 }d"); Assert.AreEqual("3M 2w", retorno); retorno = JiraTiempos.Evaluar($"{3 * 5 * 4 + 1 * 5 + 4 }d"); Assert.AreEqual("3M 1w 4d", retorno); #endregion #region Años retorno = JiraTiempos.Evaluar($"{2 * 5 * 4 * 12}d"); Assert.AreEqual("2a", retorno); retorno = JiraTiempos.Evaluar($"{2 * 5 * 4 * 12 + 3 * 5 * 4}d"); Assert.AreEqual("2a 3M", retorno); retorno = JiraTiempos.Evaluar($"{2 * 5 * 4 * 12 + 3 * 5 * 4 + 2 * 5 }d"); Assert.AreEqual("2a 3M 2w", retorno); retorno = JiraTiempos.Evaluar($"{2 * 5 * 4 * 12 + 3 * 5 * 4 + 1 * 5 + 4 }d"); Assert.AreEqual("2a 3M 1w 4d", retorno); #endregion }
public void Semanas() { #region Semanas var retorno = JiraTiempos.Evaluar($"{2}w"); Assert.AreEqual("2w", retorno); #endregion #region Mes retorno = JiraTiempos.Evaluar($"{3 * 4}w"); Assert.AreEqual("3M", retorno); retorno = JiraTiempos.Evaluar($"{3 * 4 + 2 }w"); Assert.AreEqual("3M 2w", retorno); #endregion #region Años retorno = JiraTiempos.Evaluar($"{2 * 4 * 12}w"); Assert.AreEqual("2a", retorno); retorno = JiraTiempos.Evaluar($"{2 * 4 * 12 + 3 * 4}w"); Assert.AreEqual("2a 3M", retorno); retorno = JiraTiempos.Evaluar($"{2 * 4 * 12 + 3 * 4 + 2 }w"); Assert.AreEqual("2a 3M 2w", retorno); #endregion }
public void Segundos() { #region Segundos var retorno = JiraTiempos.Evaluar(1); Assert.AreEqual("1s", retorno); #endregion #region Minutos retorno = JiraTiempos.Evaluar(1 * 60); Assert.AreEqual("1m", retorno); retorno = JiraTiempos.Evaluar(1 * 60 + 30); Assert.AreEqual("1m 30s", retorno); #endregion #region Horas retorno = JiraTiempos.Evaluar(1 * 60 * 60); Assert.AreEqual("1h", retorno); retorno = JiraTiempos.Evaluar(1 * 60 * 60 + 30 * 60); Assert.AreEqual("1h 30m", retorno); retorno = JiraTiempos.Evaluar(1 * 60 * 60 + 30 * 60 + 30); Assert.AreEqual("1h 30m 30s", retorno); #endregion #region Dias retorno = JiraTiempos.Evaluar(1 * 60 * 60 * 8); Assert.AreEqual("1d", retorno); retorno = JiraTiempos.Evaluar(1 * 60 * 60 * 8 + 7 * 60 * 60); Assert.AreEqual("1d 7h", retorno); retorno = JiraTiempos.Evaluar(1 * 60 * 60 * 8 + 7 * 60 * 60 + 30 * 60); Assert.AreEqual("1d 7h 30m", retorno); retorno = JiraTiempos.Evaluar(1 * 60 * 60 * 8 + 7 * 60 * 60 + 30 * 60 + 30); Assert.AreEqual("1d 7h 30m 30s", retorno); #endregion #region Semanas retorno = JiraTiempos.Evaluar(2 * 60 * 60 * 8 * 5); Assert.AreEqual("2w", retorno); retorno = JiraTiempos.Evaluar(1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8); Assert.AreEqual("1w 4d", retorno); retorno = JiraTiempos.Evaluar(1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8 + 7 * 60 * 60); Assert.AreEqual("1w 4d 7h", retorno); retorno = JiraTiempos.Evaluar(1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8 + 7 * 60 * 60 + 30 * 60); Assert.AreEqual("1w 4d 7h 30m", retorno); retorno = JiraTiempos.Evaluar(1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8 + 7 * 60 * 60 + 30 * 60 + 30); Assert.AreEqual("1w 4d 7h 30m 30s", retorno); #endregion #region Mes retorno = JiraTiempos.Evaluar(3 * 60 * 60 * 8 * 5 * 4); Assert.AreEqual("3M", retorno); retorno = JiraTiempos.Evaluar(3 * 60 * 60 * 8 * 5 * 4 + 2 * 60 * 60 * 8 * 5); Assert.AreEqual("3M 2w", retorno); retorno = JiraTiempos.Evaluar(3 * 60 * 60 * 8 * 5 * 4 + 1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8); Assert.AreEqual("3M 1w 4d", retorno); retorno = JiraTiempos.Evaluar(3 * 60 * 60 * 8 * 5 * 4 + 1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8 + 7 * 60 * 60); Assert.AreEqual("3M 1w 4d 7h", retorno); retorno = JiraTiempos.Evaluar(3 * 60 * 60 * 8 * 5 * 4 + 1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8 + 7 * 60 * 60 + 30 * 60); Assert.AreEqual("3M 1w 4d 7h 30m", retorno); retorno = JiraTiempos.Evaluar(3 * 60 * 60 * 8 * 5 * 4 + 1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8 + 7 * 60 * 60 + 30 * 60 + 30); Assert.AreEqual("3M 1w 4d 7h 30m 30s", retorno); #endregion #region Años retorno = JiraTiempos.Evaluar(2 * 60 * 60 * 8 * 5 * 4 * 12); Assert.AreEqual("2a", retorno); retorno = JiraTiempos.Evaluar(2 * 60 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 60 * 8 * 5 * 4); Assert.AreEqual("2a 3M", retorno); retorno = JiraTiempos.Evaluar(2 * 60 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 60 * 8 * 5 * 4 + 2 * 60 * 60 * 8 * 5); Assert.AreEqual("2a 3M 2w", retorno); retorno = JiraTiempos.Evaluar(2 * 60 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 60 * 8 * 5 * 4 + 1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8); Assert.AreEqual("2a 3M 1w 4d", retorno); retorno = JiraTiempos.Evaluar(2 * 60 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 60 * 8 * 5 * 4 + 1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8 + 7 * 60 * 60); Assert.AreEqual("2a 3M 1w 4d 7h", retorno); retorno = JiraTiempos.Evaluar(2 * 60 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 60 * 8 * 5 * 4 + 1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8 + 7 * 60 * 60 + 30 * 60); Assert.AreEqual("2a 3M 1w 4d 7h 30m", retorno); retorno = JiraTiempos.Evaluar(2 * 60 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 60 * 8 * 5 * 4 + 1 * 60 * 60 * 8 * 5 + 4 * 60 * 60 * 8 + 7 * 60 * 60 + 30 * 60 + 30); Assert.AreEqual("2a 3M 1w 4d 7h 30m 30s", retorno); #endregion }
public void Minutos() { #region Minutos var retorno = JiraTiempos.Evaluar($"{1 }m"); Assert.AreEqual("1m", retorno); #endregion #region Horas retorno = JiraTiempos.Evaluar($"{1 * 60 }m"); Assert.AreEqual("1h", retorno); retorno = JiraTiempos.Evaluar($"{1 * 60 + 30}m"); Assert.AreEqual("1h 30m", retorno); #endregion #region Dias retorno = JiraTiempos.Evaluar($"{1 * 60 * 8}m"); Assert.AreEqual("1d", retorno); retorno = JiraTiempos.Evaluar($"{1 * 60 * 8 + 7 * 60}m"); Assert.AreEqual("1d 7h", retorno); retorno = JiraTiempos.Evaluar($"{1 * 60 * 8 + 7 * 60 + 30 }m"); Assert.AreEqual("1d 7h 30m", retorno); #endregion #region Semanas retorno = JiraTiempos.Evaluar($"{2 * 60 * 8 * 5 }m"); Assert.AreEqual("2w", retorno); retorno = JiraTiempos.Evaluar($"{1 * 60 * 8 * 5 + 4 * 60 * 8 }m"); Assert.AreEqual("1w 4d", retorno); retorno = JiraTiempos.Evaluar($"{1 * 60 * 8 * 5 + 4 * 60 * 8 + 7 * 60 }m"); Assert.AreEqual("1w 4d 7h", retorno); retorno = JiraTiempos.Evaluar($"{1 * 60 * 8 * 5 + 4 * 60 * 8 + 7 * 60 + 30 }m"); Assert.AreEqual("1w 4d 7h 30m", retorno); #endregion #region Mes retorno = JiraTiempos.Evaluar($"{3 * 60 * 8 * 5 * 4}m"); Assert.AreEqual("3M", retorno); retorno = JiraTiempos.Evaluar($"{3 * 60 * 8 * 5 * 4 + 2 * 60 * 8 * 5 }m"); Assert.AreEqual("3M 2w", retorno); retorno = JiraTiempos.Evaluar($"{3 * 60 * 8 * 5 * 4 + 1 * 60 * 8 * 5 + 4 * 60 * 8 }m"); Assert.AreEqual("3M 1w 4d", retorno); retorno = JiraTiempos.Evaluar($"{3 * 60 * 8 * 5 * 4 + 1 * 60 * 8 * 5 + 4 * 60 * 8 + 7 * 60 }m"); Assert.AreEqual("3M 1w 4d 7h", retorno); retorno = JiraTiempos.Evaluar($"{3 * 60 * 8 * 5 * 4 + 1 * 60 * 8 * 5 + 4 * 60 * 8 + 7 * 60 + 30 }m"); Assert.AreEqual("3M 1w 4d 7h 30m", retorno); #endregion #region Años retorno = JiraTiempos.Evaluar($"{2 * 60 * 8 * 5 * 4 * 12}m"); Assert.AreEqual("2a", retorno); retorno = JiraTiempos.Evaluar($"{2 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 8 * 5 * 4}m"); Assert.AreEqual("2a 3M", retorno); retorno = JiraTiempos.Evaluar($"{2 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 8 * 5 * 4 + 2 * 60 * 8 * 5 }m"); Assert.AreEqual("2a 3M 2w", retorno); retorno = JiraTiempos.Evaluar($"{2 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 8 * 5 * 4 + 1 * 60 * 8 * 5 + 4 * 60 * 8 }m"); Assert.AreEqual("2a 3M 1w 4d", retorno); retorno = JiraTiempos.Evaluar($"{2 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 8 * 5 * 4 + 1 * 60 * 8 * 5 + 4 * 60 * 8 + 7 * 60 }m"); Assert.AreEqual("2a 3M 1w 4d 7h", retorno); retorno = JiraTiempos.Evaluar($"{2 * 60 * 8 * 5 * 4 * 12 + 3 * 60 * 8 * 5 * 4 + 1 * 60 * 8 * 5 + 4 * 60 * 8 + 7 * 60 + 30 }m"); Assert.AreEqual("2a 3M 1w 4d 7h 30m", retorno); #endregion }