-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #850 from gbirchmeier/nanofix
fix nanosecond-parsing bug #842, plus refactor DateTimeConverter and clean up its tests
- Loading branch information
Showing
16 changed files
with
576 additions
and
772 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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,20 @@ | ||
using NUnit.Framework; | ||
using QuickFix; | ||
using QuickFix.Fields.Converters; | ||
|
||
namespace UnitTests.Fields.Converters; | ||
|
||
[TestFixture] | ||
public class BoolConverterTests { | ||
|
||
[Test] | ||
public void Convert() | ||
{ | ||
Assert.That(BoolConverter.Convert("Y"), Is.EqualTo(true)); | ||
Assert.That(BoolConverter.Convert("N"), Is.EqualTo(false)); | ||
Assert.That(BoolConverter.Convert(true), Is.EqualTo("Y")); | ||
Assert.That(BoolConverter.Convert(false), Is.EqualTo("N")); | ||
Assert.Throws(typeof(FieldConvertError), | ||
delegate { BoolConverter.Convert("Z"); }); | ||
} | ||
} |
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,18 @@ | ||
using NUnit.Framework; | ||
using QuickFix; | ||
using QuickFix.Fields.Converters; | ||
|
||
namespace UnitTests.Fields.Converters; | ||
|
||
[TestFixture] | ||
public class CharConverterTests { | ||
|
||
[Test] | ||
public void Convert() | ||
{ | ||
Assert.That(CharConverter.Convert('A'), Is.EqualTo("A")); | ||
Assert.That(CharConverter.Convert("B"), Is.EqualTo('B')); | ||
Assert.Throws(typeof(FieldConvertError), | ||
delegate { CharConverter.Convert("AB"); }); | ||
} | ||
} |
Oops, something went wrong.