Fix test that could come up with journals with 0 transactions, and improve test coverage for file routine.

This commit is contained in:
James Cole
2018-05-10 20:05:02 +02:00
parent 6bd23d897f
commit 274162afcd
10 changed files with 655 additions and 400 deletions

View File

@@ -34,17 +34,7 @@ class RabobankDebitCreditTest extends TestCase
/**
* @covers \FireflyIII\Import\Converter\RabobankDebitCredit::convert()
*/
public function testConvertAf()
{
$converter = new RabobankDebitCredit;
$result = $converter->convert('D');
$this->assertEquals(-1, $result);
}
/**
* @covers \FireflyIII\Import\Converter\RabobankDebitCredit::convert()
*/
public function testConvertAnything()
public function testConvertAnything(): void
{
$converter = new RabobankDebitCredit;
$result = $converter->convert('9083jkdkj');
@@ -54,10 +44,40 @@ class RabobankDebitCreditTest extends TestCase
/**
* @covers \FireflyIII\Import\Converter\RabobankDebitCredit::convert()
*/
public function testConvertBij()
public function testConvertCredit(): void
{
$converter = new RabobankDebitCredit;
$result = $converter->convert('C');
$this->assertEquals(1, $result);
}
/**
* @covers \FireflyIII\Import\Converter\RabobankDebitCredit::convert()
*/
public function testConvertCreditOld(): void
{
$converter = new RabobankDebitCredit;
$result = $converter->convert('B');
$this->assertEquals(1, $result);
}
/**
* @covers \FireflyIII\Import\Converter\RabobankDebitCredit::convert()
*/
public function testConvertDebit(): void
{
$converter = new RabobankDebitCredit;
$result = $converter->convert('D');
$this->assertEquals(-1, $result);
}
/**
* @covers \FireflyIII\Import\Converter\RabobankDebitCredit::convert()
*/
public function testConvertDebitOld(): void
{
$converter = new RabobankDebitCredit;
$result = $converter->convert('A');
$this->assertEquals(-1, $result);
}
}