Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdc01da
commit c080866
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
test/net/sourceforge/zmanim/hebrewcalendar/YomiCalculatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package net.sourceforge.zmanim.hebrewcalendar; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class YomiCalculatorTest { | ||
private static HebrewDateFormatter hdf = new HebrewDateFormatter(); | ||
static { | ||
hdf.setHebrewFormat(true); | ||
} | ||
|
||
@Test | ||
public void testCorrectDaf1() { | ||
JewishCalendar jewishCalendar = new JewishCalendar(5685, JewishDate.KISLEV, 12); | ||
Daf daf = YomiCalculator.getDafYomiBavli(jewishCalendar); | ||
Assert.assertEquals(5, daf.getMasechtaNumber()); | ||
Assert.assertEquals(2, daf.getDaf()); | ||
System.out.println(hdf.formatDafYomiYerushalmi(jewishCalendar.getDafYomiBavli())); | ||
} | ||
|
||
@Test | ||
public void testCorrectDaf2() { | ||
JewishCalendar jewishCalendar = new JewishCalendar(5736, JewishDate.ELUL, 26); | ||
Daf daf = YomiCalculator.getDafYomiBavli(jewishCalendar); | ||
Assert.assertEquals(4, daf.getMasechtaNumber()); | ||
Assert.assertEquals(14, daf.getDaf()); | ||
System.out.println(hdf.formatDafYomiYerushalmi(jewishCalendar.getDafYomiBavli())); | ||
} | ||
|
||
@Test | ||
public void testCorrectDaf3() { | ||
JewishCalendar jewishCalendar = new JewishCalendar(5777, JewishDate.ELUL, 10); | ||
Daf daf = YomiCalculator.getDafYomiBavli(jewishCalendar); | ||
Assert.assertEquals(23, daf.getMasechtaNumber()); | ||
Assert.assertEquals(47, daf.getDaf()); | ||
System.out.println(hdf.formatDafYomiYerushalmi(jewishCalendar.getDafYomiBavli())); | ||
} | ||
} |