Beispiel #1
0
		public void HorizontalAxisTest()
		{
			ChartPlotter target = new ChartPlotter();
			IAxis expected = new HorizontalAxis();
			IAxis actual;
			target.HorizontalAxis = expected;
			actual = target.HorizontalAxis;
			Assert.AreEqual(expected, actual);
		}
Beispiel #2
0
		public void HorizontalAxisTest()
		{
			ChartPlotter plotter = new ChartPlotter();
			var expected = new HorizontalAxis();
			plotter.MainHorizontalAxis = expected;
			GeneralAxis actual = plotter.MainHorizontalAxis;

			Assert.AreEqual(expected, actual);
			Assert.IsTrue(plotter.Children.OfType<HorizontalAxis>().Count() == 1);
		}
Beispiel #3
0
		public void HorizontalAxisIsDefaultTest()
		{
			ChartPlotter plotter = new ChartPlotter();

			HorizontalAxis axis = (HorizontalAxis)plotter.HorizontalAxis;
			HorizontalAxis axis2 = new HorizontalAxis();
			plotter.Children.Add(axis2);

			Assert.AreEqual(plotter.HorizontalAxis, axis);
			Assert.IsTrue(axis.IsDefaultAxis);

			axis2.IsDefaultAxis = true;
			Assert.AreEqual(plotter.HorizontalAxis, axis2);
			Assert.IsFalse(axis.IsDefaultAxis);

			axis.IsDefaultAxis = true;
			Assert.AreEqual(plotter.HorizontalAxis, axis);
			Assert.IsFalse(axis2.IsDefaultAxis);
		}
Beispiel #4
0
		public void HorizontalAxisIsDefaultTest()
		{
			ChartPlotter plotter = new ChartPlotter();
			plotter.PerformLoad();

			HorizontalAxis axis = (HorizontalAxis)plotter.MainHorizontalAxis;
			HorizontalAxis axis2 = new HorizontalAxis();
			plotter.Children.Add(axis2);

			Assert.AreEqual(plotter.MainHorizontalAxis, axis);
			Assert.IsTrue(axis.IsDefaultAxis);
			Assert.AreEqual(2, plotter.Children.OfType<HorizontalAxis>().Count());

			axis2.IsDefaultAxis = true;
			Assert.AreEqual(axis2, plotter.MainHorizontalAxis);
			Assert.IsFalse(axis.IsDefaultAxis);

			axis.IsDefaultAxis = true;
			Assert.AreEqual(plotter.MainHorizontalAxis, axis);
			Assert.IsFalse(axis2.IsDefaultAxis);
		}
Beispiel #5
0
		public void RemovingWhileViewportChange()
		{
			ChartPlotter plotter = new ChartPlotter();
			HorizontalAxis axis = new HorizontalAxis();
			plotter.Children.Add(axis);

			plotter.PerformLoad();

			plotter.Viewport.Visible = new DataRect(2, 3, 4, 5);
			plotter.Children.Remove(axis);

			plotter.Wait(DispatcherPriority.Background);
		}