public void ConversionToBaseSet() { CurrencySet <Iso4217.Currency> convSet = _set; var allCur = convSet.AllCurencies; var cur = convSet.TryParse("EUR"); }
public void TryParseNumCodeFail() { var set = new CurrencySet(new[] { _xa, _xb, _xc }); ICurrency c; Assert.IsFalse(set.TryParse("???", out c)); }
public void TryParseCharCode() { var set = new CurrencySet(new[] { _xa, _xb, _xc }); ICurrency c; Assert.IsTrue(set.TryParse("XA", out c)); Assert.AreEqual("XA", c.CharCode); }
public void ParseCharFalse() { var set = new CurrencySet(new[] { _xa, _xb, _xc }); Assert.Throws <NotSupportedException>(() => { set.Parse("???"); }); }
public void Create() { ICurrencySet set = new CurrencySet(new[] { _xa, _xb, _xc }); Assert.AreEqual(3, set.AllCurencies.Count); Assert.IsTrue(set.Contain(_xa)); Assert.IsTrue(set.Contain(_xb)); Assert.IsTrue(set.Contain(_xc)); }
public void NotContainCode() { var set = new CurrencySet(new[] { _xa, _xb, _xc }); Assert.IsFalse(set.Contain("???")); }
public void NotContainCurrency() { var set = new CurrencySet(new[] { _xa, _xb, _xc }); Assert.IsFalse(set.Contain(new FakeCurrency())); }
public void ParseCharCode() { var set = new CurrencySet(new[] { _xa, _xb, _xc }); Assert.AreEqual("XA", set.Parse("XA").CharCode); }
public void Contains() { var set = new CurrencySet(new[] { _xa, _xb, _xc }); Assert.IsTrue(set.Contain(_xa.CharCode)); }