Beispiel #1
0
		public void TestProperties()
		{
			Event evnt = new Event();
			
			evnt.CoveragePercentage = this.dec;
			evnt.EventDate = this.date;

			Assert.AreEqual(this.dec, evnt.CoveragePercentage, "CoveragePercentage get/set not working");
			Assert.AreEqual(this.date, evnt.EventDate, "EventDate get/set not working");
		}
Beispiel #2
0
		public void Insert()
		{
			this.events.Add(this.evnt);
			this.events.Add(this.evnt);
			this.events.Add(this.evnt);
			this.events.Add(this.evnt);

			Event e1 = new Event();
			this.events.Insert(2, e1);

			Assert.AreEqual(e1, this.events[2]);
		}
Beispiel #3
0
		public void SetUp()
		{
			this.history = new History();

			this.event1 = new Event();
			this.event1.EventDate = new DateTime(2000,01,01);

			this.event2 = new Event();
			this.event2.EventDate = new DateTime(2001,01,01);
		
			this.event3 = new Event();
			this.event3.EventDate = new DateTime(2002,01,01);
		}
Beispiel #4
0
		private static void Update(History history, decimal percentage)
		{
			//if exactly same coverage percentage as before don't bother updating.
			Event latestEvent = history.Events[0];
			if (latestEvent != null && latestEvent.CoveragePercentage == percentage)
			{
				Trace.WriteLineIf(Logger.OutputType.TraceVerbose, "Not adding additional historic event as coverage percentage has not changed at " + percentage);
			}
			else
			{
				Event evnt = new Event(percentage);
				history.Events.Add(evnt);
			}
		}
Beispiel #5
0
		public void TestConstructor()
		{
			Event evnt = new Event(this.dec);
			Assert.AreEqual(this.dec, evnt.CoveragePercentage, "CoveragePercentage should be set by constructor");
	
			try
			{
				string s = evnt.CoveragePercentageColor;
				Assert.Fail();
			}
			catch(InvalidOperationException)
			{
			}
			catch(ArgumentOutOfRangeException)
			{
			}
		}
Beispiel #6
0
		public void Setup()
		{
			this.events = new EventCollection();
			this.evnt = new Event();
		}
Beispiel #7
0
        /// <summary>
        /// Adds the specified evnt.
        /// </summary>
        /// <param name="evnt">The evnt.</param>
        /// <returns></returns>
		public int Add(Event evnt)
		{
			return base.InnerList.Add(evnt);
		}
Beispiel #8
0
        /// <summary>
        /// Removes the specified evnt.
        /// </summary>
        /// <param name="evnt">The evnt.</param>
		public void Remove(Event evnt)
		{
			base.InnerList.Remove(evnt);
		}
Beispiel #9
0
        /// <summary>
        /// Inserts the specified index.
        /// </summary>
        /// <param name="index">The index.</param>
        /// <param name="evnt">The evnt.</param>
		public void Insert(int index, Event evnt)
		{
			base.InnerList.Insert(index, evnt);
		}