public void TestFreeze() { var value = new TrueClass(); Assert.IsTrue(value.Frozen); Assert.That(value.Freeze(), Is.EqualTo(value)); Assert.IsTrue(value.Frozen); }
public void TestClass() { var value = new TrueClass(); Assert.That(value.Class, Is.EqualTo(Class.TRUE)); Assert.That(value.SingletonClass, Is.EqualTo(Class.TRUE)); Assert.That(value.EffectiveClass, Is.EqualTo(Class.TRUE)); Assert.IsFalse(value.HasSingletonClass); }
public void TestIsA() { var value = new TrueClass(); Assert.IsTrue(value.IsA(Class.TRUE)); Assert.IsTrue(value.IsA(Class.OBJECT)); Assert.IsTrue(value.IsA(Class.BASIC_OBJECT)); Assert.IsFalse(value.IsA(Class.FIXNUM)); Assert.IsFalse(value.IsA(Class.SYMBOL)); Assert.IsFalse(value.IsA(Class.FALSE)); }
public void Setup() { this.@class = new TrueClass(null); }