From 071c4286a703ca31091f59602447833da409a4ee Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 29 Dec 2017 12:27:29 +0100 Subject: [PATCH] Add a test for the Rabobank converter. --- .../Converter/RabobankDebitCreditTest.php | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 tests/Unit/Import/Converter/RabobankDebitCreditTest.php diff --git a/tests/Unit/Import/Converter/RabobankDebitCreditTest.php b/tests/Unit/Import/Converter/RabobankDebitCreditTest.php new file mode 100644 index 0000000000..e746d7ca5e --- /dev/null +++ b/tests/Unit/Import/Converter/RabobankDebitCreditTest.php @@ -0,0 +1,63 @@ +. + */ + +declare(strict_types=1); + +namespace Tests\Unit\Import\Converter; + +use FireflyIII\Import\Converter\RabobankDebitCredit; +use Tests\TestCase; + +/** + * Class RabobankDebitCredit + */ +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() + { + $converter = new RabobankDebitCredit; + $result = $converter->convert('9083jkdkj'); + $this->assertEquals(1, $result); + } + + /** + * @covers \FireflyIII\Import\Converter\RabobankDebitCredit::convert() + */ + public function testConvertBij() + { + $converter = new RabobankDebitCredit; + $result = $converter->convert('C'); + $this->assertEquals(1, $result); + } +} \ No newline at end of file