public void TestConstructor() { MockedGraphicsDeviceService service = new MockedGraphicsDeviceService(); using(IDisposable keeper = service.CreateDevice()) { using(IDisposable context = new BasicEffectDrawContext(service.GraphicsDevice)) { Assert.IsNotNull(context); } } }
public void TestConstructor() { MockedGraphicsDeviceService service = new MockedGraphicsDeviceService(); using (IDisposable keeper = service.CreateDevice()) { using (IDisposable context = new BasicEffectDrawContext(service.GraphicsDevice)) { Assert.IsNotNull(context); } } }
public void TestEffectRetrieval() { MockedGraphicsDeviceService service = new MockedGraphicsDeviceService(); using (IDisposable keeper = service.CreateDevice()) { using ( BasicEffectDrawContext test = new BasicEffectDrawContext(service.GraphicsDevice) ) { Assert.AreSame(test.Effect, test.BasicEffect); } } }
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)); } } } }
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)); } } }
public void TestDrawWithoutIndices() { using (Creator creator = new Creator()) { TestVertex[] vertices = new TestVertex[9]; using ( BasicEffectDrawContext context = new BasicEffectDrawContext( creator.GraphicsDevice ) ) { creator.BatchDrawer.Select(vertices, 9); creator.BatchDrawer.Draw(0, 9, PrimitiveType.TriangleList, context); } } }
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)); } } } }
public void TestDrawWithoutIndices() { using(Creator creator = new Creator()) { TestVertex[] vertices = new TestVertex[9]; using( BasicEffectDrawContext context = new BasicEffectDrawContext( creator.GraphicsDevice ) ) { creator.BatchDrawer.Select(vertices, 9); creator.BatchDrawer.Draw(0, 9, PrimitiveType.TriangleList, context); } } }
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)); } } }
public void TestEffectRetrieval() { MockedGraphicsDeviceService service = new MockedGraphicsDeviceService(); using(IDisposable keeper = service.CreateDevice()) { using( BasicEffectDrawContext test = new BasicEffectDrawContext(service.GraphicsDevice) ) { Assert.AreSame(test.Effect, test.BasicEffect); } } }