/// <summary> /// Crea una instancia del Haab en la fecha indicada. /// </summary> /// <param name="count">Día del Haab.</param> /// <param name="uinal">Nombre del Uninal.</param> public Haab(int count, Uinal uinal) { this.Count = count; this.Uinal = uinal; }
public void Compute_ConFechaGregorianaValida_GeneraLaFechaMayaEsperada(int year, int month, int day, int expectedBaktun, int expectedKatun, int expectedTun, int expectedUinal, int expectedKin, int expectedHaabCount, Uinal expectedHaabUinal, int expectedTzolkinCount, Kin expectedTzolkinKin) { Date date = new Date(year, month, day, Era.AfterCrist); Assert.That(date.Baktun, Is.EqualTo(expectedBaktun)); Assert.That(date.Katun, Is.EqualTo(expectedKatun)); Assert.That(date.Tun, Is.EqualTo(expectedTun)); Assert.That(date.Uinal, Is.EqualTo(expectedUinal)); Assert.That(date.Kin, Is.EqualTo(expectedKin)); Assert.That(date.Haab.Count, Is.EqualTo(expectedHaabCount)); Assert.That(date.Haab.Uinal, Is.EqualTo(expectedHaabUinal)); Assert.That(date.Tzolkin.Count, Is.EqualTo(expectedTzolkinCount)); Assert.That(date.Tzolkin.Kin, Is.EqualTo(expectedTzolkinKin)); }
/// <summary> /// Crea una instancia del Haab en la fecha del 8 Cumku. /// </summary> public Haab() { this.Count = 8; this.Uinal = Uinal.Cumku; }
public void Compute_ConFechaMayaValida_GeneraElHaabEsperado(int baktun, int katun, int tun, int uinal, int kin, int expectedHaabCount, Uinal expectedHaabUinal) { Date date = new Date(baktun, katun, tun, uinal, kin); Assert.That(date.Haab.Count, Is.EqualTo(expectedHaabCount)); Assert.That(date.Haab.Uinal, Is.EqualTo(expectedHaabUinal)); }