public void TestEqualsWithDifferentObject() { TestDrawContext testContext1 = new TestDrawContext(); TestDrawContext testContext2 = new TestDrawContext(); Assert.IsFalse(testContext1.Equals((object)testContext2)); }
public void TestEqualsWithIncpmpatibleDrawContext() { MockedGraphicsDeviceService service = new MockedGraphicsDeviceService(); using (IDisposable keeper = service.CreateDevice()) { using (BasicEffect effect = new BasicEffect(service.GraphicsDevice)) { TestEffectDrawContext test1 = new TestEffectDrawContext(effect); TestDrawContext test2 = new TestDrawContext(); Assert.IsFalse(test1.Equals((object)test2)); } } }
public void TestEqualsWithIncompatibleObject() { TestDrawContext testContext = new TestDrawContext(); Assert.IsFalse(testContext.Equals(123)); }
public void TestGetHashcode() { TestDrawContext testContext = new TestDrawContext(); Assert.AreEqual(testContext.GetHashCode(), testContext.GetHashCode()); }
public void TestEqualsWithSameObject() { TestDrawContext testContext = new TestDrawContext(); Assert.IsTrue(testContext.Equals((object)testContext)); }
public void TestEqualsWithIncpmpatibleDrawContext() { MockedGraphicsDeviceService service = new MockedGraphicsDeviceService(); using(IDisposable keeper = service.CreateDevice()) { #if XNA_4 using(BasicEffect effect = new BasicEffect(service.GraphicsDevice)) { TestEffectDrawContext test1 = new TestEffectDrawContext(effect); TestDrawContext test2 = new TestDrawContext(); Assert.IsFalse(test1.Equals((object)test2)); } #else using(EffectPool pool = new EffectPool()) { using(BasicEffect effect = new BasicEffect(service.GraphicsDevice, pool)) { TestEffectDrawContext test1 = new TestEffectDrawContext(effect); TestDrawContext test2 = new TestDrawContext(); Assert.IsFalse(test1.Equals((object)test2)); } } #endif } }