コード例 #1
0
        public void TestEqualsWithIncompatibleEffect()
        {
            MockedGraphicsDeviceService service = new MockedGraphicsDeviceService();

            using (IDisposable keeper = service.CreateDevice()) {
                using (
                    BasicEffectDrawContext test1 = new BasicEffectDrawContext(service.GraphicsDevice)
                    ) {
                    TestEffectDrawContext test2 = new TestEffectDrawContext(null);

                    Assert.IsFalse(test1.Equals((object)test2));
                }
            }
        }
コード例 #2
0
 public void TestEqualsWithDifferentObject() {
   MockedGraphicsDeviceService service = new MockedGraphicsDeviceService();
   using(IDisposable keeper = service.CreateDevice()) {
     using(
       BasicEffectDrawContext test1 = new BasicEffectDrawContext(service.GraphicsDevice)
     ) {
       using(
         BasicEffectDrawContext test2 = new BasicEffectDrawContext(service.GraphicsDevice)
       ) {
         Assert.IsTrue(test1.Equals((object)test2));
       }
     }
   }
 }
コード例 #3
0
        public void TestEqualsWithDifferentObject()
        {
            MockedGraphicsDeviceService service = new MockedGraphicsDeviceService();

            using (IDisposable keeper = service.CreateDevice()) {
                using (
                    BasicEffectDrawContext test1 = new BasicEffectDrawContext(service.GraphicsDevice)
                    ) {
                    using (
                        BasicEffectDrawContext test2 = new BasicEffectDrawContext(service.GraphicsDevice)
                        ) {
                        Assert.IsTrue(test1.Equals((object)test2));
                    }
                }
            }
        }
コード例 #4
0
    public void TestEqualsWithIncompatibleEffect() {
      MockedGraphicsDeviceService service = new MockedGraphicsDeviceService();
      using(IDisposable keeper = service.CreateDevice()) {
        using(
          BasicEffectDrawContext test1 = new BasicEffectDrawContext(service.GraphicsDevice)
        ) {
          TestEffectDrawContext test2 = new TestEffectDrawContext(null);

          Assert.IsFalse(test1.Equals((object)test2));
        }
      }
    }