コード例 #1
0
        public void ConvertInvalidTransactionTypeValueTest(string toConvert)
        {
            var converter     = new TransactionTypeConverter();
            var convertedType = (TransactionType)converter.ConvertFromString(toConvert, null, null);

            convertedType.Should().Be(TransactionType.None);
        }
コード例 #2
0
        public void ConvertValidTransactionTypeBuyTest_Buy(string toConvert)
        {
            var converter     = new TransactionTypeConverter();
            var convertedType = (TransactionType)converter.ConvertFromString(toConvert, null, null);

            convertedType.Should().Be(TransactionType.Buy);
        }
コード例 #3
0
 public void TransactionType_ConvertFromString_NullShouldRetunUnknown()
 {
     Assert.IsTrue((TransactionType)_converter.ConvertFromString(null, null, null) == TransactionType.Unknown);
 }