public void SetGetDouble() { QuickFix.Dictionary d = new QuickFix.Dictionary(); d.SetDouble("DOUBLEKEY1", 12.3); d.SetDouble("DOUBLEKEY2", 987362.987362); d.SetString("BADDOUBLEKEY", "AB12.3"); Assert.That(d.GetDouble("DOUBLEKEY1"), Is.EqualTo(12.3)); Assert.That(d.GetDouble("DOUBLEKEY2"), Is.EqualTo(987362.987362)); Assert.Throws <ConfigError>(delegate { d.GetDouble("DOUBLEKEY3"); }); Assert.Throws <ConfigError>(delegate { d.GetDouble("BADDOUBLEKEY"); }); }
public void SetGetDouble() { QuickFix.Dictionary d = new QuickFix.Dictionary(); d.SetDouble("DOUBLEKEY1", 12.3); d.SetDouble("DOUBLEKEY2", 987362.987362); d.SetString("BADDOUBLEKEY", "AB12.3"); Assert.That(d.GetDouble("DOUBLEKEY1"), Is.EqualTo(12.3)); Assert.That(d.GetDouble("DOUBLEKEY2"), Is.EqualTo(987362.987362)); Assert.Throws<ConfigError>(delegate { d.GetDouble("DOUBLEKEY3"); }); Assert.Throws<ConfigError>(delegate { d.GetDouble("BADDOUBLEKEY"); }); }
public void GetDouble() { // make sure that QF/n uses the invariant culture, no matter what the current culture is System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR"); QuickFix.Dictionary d = new QuickFix.Dictionary(); d.SetString("DOUBLEKEY1", "12.3"); d.SetString("DOUBLEKEY2", "987362.987362"); d.SetString("BADDOUBLEKEY", "AB12.3"); d.SetString("FOREIGNFORMAT", "44,44"); Assert.That(d.GetDouble("DOUBLEKEY1"), Is.EqualTo(12.3)); Assert.That(d.GetDouble("DOUBLEKEY2"), Is.EqualTo(987362.987362)); Assert.Throws <ConfigError>(delegate { d.GetDouble("DOUBLEKEY3"); }); Assert.Throws <ConfigError>(delegate { d.GetDouble("BADDOUBLEKEY"); }); Assert.Throws <ConfigError>(delegate { d.GetDouble("BADDOUBLEKEY"); }); }
public void GetDouble() { // make sure that QF/n uses the invariant culture, no matter what the current culture is System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR"); QuickFix.Dictionary d = new QuickFix.Dictionary(); d.SetString("DOUBLEKEY1", "12.3"); d.SetString("DOUBLEKEY2", "987362.987362"); d.SetString("BADDOUBLEKEY", "AB12.3"); d.SetString("FOREIGNFORMAT", "44,44"); Assert.That(d.GetDouble("DOUBLEKEY1"), Is.EqualTo(12.3)); Assert.That(d.GetDouble("DOUBLEKEY2"), Is.EqualTo(987362.987362)); Assert.Throws<ConfigError>(delegate { d.GetDouble("DOUBLEKEY3"); }); Assert.Throws<ConfigError>(delegate { d.GetDouble("BADDOUBLEKEY"); }); Assert.Throws<ConfigError>(delegate { d.GetDouble("BADDOUBLEKEY"); }); }