/Branches/PostBeta1Work/SharpMap.Rendering.Wpf.Test/VectorRendererTest.cs
C# | 252 lines | 169 code | 18 blank | 65 comment | 0 complexity | 2446118e8d52c3a46004f0e8cc88e03d MD5 | raw file
- using SharpMap.Wpf.Rendering;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using SharpMap.Rendering.Rendering2D;
- using System.Windows.Media;
- using System.Collections.Generic;
- using SharpMap.Styles;
- using SharpMap.Rendering;
-
- namespace SharpMap.Rendering.Wpf.Test
- {
-
-
- /// <summary>
- ///This is a test class for VectorRendererTest and is intended
- ///to contain all VectorRendererTest Unit Tests
- ///</summary>
- [TestClass()]
- public class VectorRendererTest
- {
-
-
- private TestContext testContextInstance;
-
- /// <summary>
- ///Gets or sets the test context which provides
- ///information about and functionality for the current test run.
- ///</summary>
- public TestContext TestContext
- {
- get
- {
- return testContextInstance;
- }
- set
- {
- testContextInstance = value;
- }
- }
-
- #region Additional test attributes
- //
- //You can use the following additional attributes as you write your tests:
- //
- //Use ClassInitialize to run code before running the first test in the class
- //[ClassInitialize()]
- //public static void MyClassInitialize(TestContext testContext)
- //{
- //}
- //
- //Use ClassCleanup to run code after all tests in a class have run
- //[ClassCleanup()]
- //public static void MyClassCleanup()
- //{
- //}
- //
- //Use TestInitialize to run code before running each test
- //[TestInitialize()]
- //public void MyTestInitialize()
- //{
- //}
- //
- //Use TestCleanup to run code after each test has run
- //[TestCleanup()]
- //public void MyTestCleanup()
- //{
- //}
- //
- #endregion
-
-
- /// <summary>
- ///A test for TryGetCache
- ///</summary>
- [TestMethod()]
- [DeploymentItem("SharpMap.Rendering.Wpf.dll")]
- public void TryGetCacheTest()
- {
- VectorRenderer_Accessor target = new VectorRenderer_Accessor(); // TODO: Initialize to an appropriate value
- Path2D path = null; // TODO: Initialize to an appropriate value
- StreamGeometry pathCache = null; // TODO: Initialize to an appropriate value
- StreamGeometry pathCacheExpected = null; // TODO: Initialize to an appropriate value
- bool expected = false; // TODO: Initialize to an appropriate value
- bool actual;
- actual = target.TryGetCache(path, out pathCache);
- Assert.AreEqual(pathCacheExpected, pathCache);
- Assert.AreEqual(expected, actual);
- Assert.Inconclusive("Verify the correctness of this test method.");
- }
-
- /// <summary>
- ///A test for RenderSymbols
- ///</summary>
- [TestMethod()]
- public void RenderSymbolsTest2()
- {
- VectorRenderer target = new VectorRenderer(); // TODO: Initialize to an appropriate value
- IEnumerable<Point2D> locations = null; // TODO: Initialize to an appropriate value
- Symbol2D symbolData = null; // TODO: Initialize to an appropriate value
- RenderState renderState = new RenderState(); // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> expected = null; // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> actual;
- actual = target.RenderSymbols(locations, symbolData, renderState);
- Assert.AreEqual(expected, actual);
- Assert.Inconclusive("Verify the correctness of this test method.");
- }
-
- /// <summary>
- ///A test for RenderSymbols
- ///</summary>
- [TestMethod()]
- public void RenderSymbolsTest1()
- {
- VectorRenderer target = new VectorRenderer(); // TODO: Initialize to an appropriate value
- IEnumerable<Point2D> locations = null; // TODO: Initialize to an appropriate value
- Symbol2D symbol = null; // TODO: Initialize to an appropriate value
- Symbol2D highlightSymbol = null; // TODO: Initialize to an appropriate value
- Symbol2D selectSymbol = null; // TODO: Initialize to an appropriate value
- RenderState renderState = new RenderState(); // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> expected = null; // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> actual;
- actual = target.RenderSymbols(locations, symbol, highlightSymbol, selectSymbol, renderState);
- Assert.AreEqual(expected, actual);
- Assert.Inconclusive("Verify the correctness of this test method.");
- }
-
- /// <summary>
- ///A test for RenderSymbols
- ///</summary>
- [TestMethod()]
- public void RenderSymbolsTest()
- {
- VectorRenderer target = new VectorRenderer(); // TODO: Initialize to an appropriate value
- IEnumerable<Point2D> locations = null; // TODO: Initialize to an appropriate value
- Symbol2D symbolData = null; // TODO: Initialize to an appropriate value
- ColorMatrix highlight = null; // TODO: Initialize to an appropriate value
- ColorMatrix select = null; // TODO: Initialize to an appropriate value
- RenderState renderState = new RenderState(); // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> expected = null; // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> actual;
- actual = target.RenderSymbols(locations, symbolData, highlight, select, renderState);
- Assert.AreEqual(expected, actual);
- Assert.Inconclusive("Verify the correctness of this test method.");
- }
-
- /// <summary>
- ///A test for RenderPaths
- ///</summary>
- [TestMethod()]
- public void RenderPathsTest2()
- {
- VectorRenderer target = new VectorRenderer(); // TODO: Initialize to an appropriate value
- IEnumerable<Path2D> paths = null; // TODO: Initialize to an appropriate value
- StylePen line = null; // TODO: Initialize to an appropriate value
- StylePen highlightLine = null; // TODO: Initialize to an appropriate value
- StylePen selectLine = null; // TODO: Initialize to an appropriate value
- StylePen outline = null; // TODO: Initialize to an appropriate value
- StylePen highlightOutline = null; // TODO: Initialize to an appropriate value
- StylePen selectOutline = null; // TODO: Initialize to an appropriate value
- RenderState renderState = new RenderState(); // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> expected = null; // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> actual;
- actual = target.RenderPaths(paths, line, highlightLine, selectLine, outline, highlightOutline, selectOutline, renderState);
- Assert.AreEqual(expected, actual);
- Assert.Inconclusive("Verify the correctness of this test method.");
- }
-
- /// <summary>
- ///A test for RenderPaths
- ///</summary>
- [TestMethod()]
- public void RenderPathsTest1()
- {
- VectorRenderer target = new VectorRenderer(); // TODO: Initialize to an appropriate value
- IEnumerable<Path2D> paths = null; // TODO: Initialize to an appropriate value
- StyleBrush fill = null; // TODO: Initialize to an appropriate value
- StyleBrush highlightFill = null; // TODO: Initialize to an appropriate value
- StyleBrush selectFill = null; // TODO: Initialize to an appropriate value
- StylePen outline = null; // TODO: Initialize to an appropriate value
- StylePen highlightOutline = null; // TODO: Initialize to an appropriate value
- StylePen selectOutline = null; // TODO: Initialize to an appropriate value
- RenderState renderState = new RenderState(); // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> expected = null; // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> actual;
- actual = target.RenderPaths(paths, fill, highlightFill, selectFill, outline, highlightOutline, selectOutline, renderState);
- Assert.AreEqual(expected, actual);
- Assert.Inconclusive("Verify the correctness of this test method.");
- }
-
- /// <summary>
- ///A test for RenderPaths
- ///</summary>
- [TestMethod()]
- public void RenderPathsTest()
- {
- VectorRenderer target = new VectorRenderer(); // TODO: Initialize to an appropriate value
- IEnumerable<Path2D> paths = null; // TODO: Initialize to an appropriate value
- StylePen outline = null; // TODO: Initialize to an appropriate value
- StylePen highlightOutline = null; // TODO: Initialize to an appropriate value
- StylePen selectOutline = null; // TODO: Initialize to an appropriate value
- RenderState renderState = new RenderState(); // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> expected = null; // TODO: Initialize to an appropriate value
- IEnumerable<Drawing> actual;
- actual = target.RenderPaths(paths, outline, highlightOutline, selectOutline, renderState);
- Assert.AreEqual(expected, actual);
- Assert.Inconclusive("Verify the correctness of this test method.");
- }
-
- /// <summary>
- ///A test for CreatePaths
- ///</summary>
- [TestMethod()]
- [DeploymentItem("SharpMap.Rendering.Wpf.dll")]
- public void CreatePathsTest()
- {
- VectorRenderer_Accessor target = new VectorRenderer_Accessor(); // TODO: Initialize to an appropriate value
- IEnumerable<Path2D> paths = null; // TODO: Initialize to an appropriate value
- bool filled = false; // TODO: Initialize to an appropriate value
- bool stroked = false; // TODO: Initialize to an appropriate value
- IEnumerable<StreamGeometry> expected = null; // TODO: Initialize to an appropriate value
- IEnumerable<StreamGeometry> actual;
- actual = target.CreatePaths(paths, filled, stroked);
- Assert.AreEqual(expected, actual);
- Assert.Inconclusive("Verify the correctness of this test method.");
- }
-
- /// <summary>
- ///A test for AddCache
- ///</summary>
- [TestMethod()]
- [DeploymentItem("SharpMap.Rendering.Wpf.dll")]
- public void AddCacheTest()
- {
- VectorRenderer_Accessor target = new VectorRenderer_Accessor(); // TODO: Initialize to an appropriate value
- Path2D path = null; // TODO: Initialize to an appropriate value
- StreamGeometry pathCache = null; // TODO: Initialize to an appropriate value
- target.AddCache(path, pathCache);
- Assert.Inconclusive("A method that does not return a value cannot be verified.");
- }
-
- /// <summary>
- ///A test for VectorRenderer Constructor
- ///</summary>
- [TestMethod()]
- public void CreateWpfVectorRendererTest()
- {
- VectorRenderer renderer = new VectorRenderer();
- Assert.AreEqual(new Matrix2D(), renderer.RenderTransform);
- Assert.AreEqual(StyleRenderingMode.Default, renderer.StyleRenderingMode);
- renderer.Dispose();
- }
- }
- }