public void TryReadBooleanTest() { var hash = new Hashtable(); bool? res; object rawValue; Assert.That(GameParameterReader.TryReadBooleanParameter(hash, GameParameter.IsOpen, out res, out rawValue), Is.True); Assert.That(res, Is.Null); Assert.That(rawValue, Is.Null); hash.Add((byte)GameParameter.IsOpen, true); Assert.That(GameParameterReader.TryReadBooleanParameter(hash, GameParameter.IsOpen, out res, out rawValue), Is.True); Assert.That(res, Is.True); Assert.That(rawValue, Is.Not.Null.And.True); hash.Clear(); hash.Add((int)GameParameter.IsOpen, false); Assert.That(GameParameterReader.TryReadBooleanParameter(hash, GameParameter.IsOpen, out res, out rawValue), Is.True); Assert.That(res, Is.False); Assert.That(rawValue, Is.Not.Null.And.False); }