Пример #1
0
		public void AddMethod ()
		{
			ArrayList list = new ArrayList ();
			SelectedDatesCollection s = new SelectedDatesCollection (list);			
			
			s.Add (DateTime.Today);
			Assert.AreEqual (true, s.Contains (DateTime.Today), "A1");
			Assert.AreEqual (1, s.Count, "A2");
			
			s.Add (DateTime.Today);	// Duplicates are not inserted
			Assert.AreEqual (1, s.Count, "A2");
		}
Пример #2
0
		public void ClearMethod ()
		{
			ArrayList list = new ArrayList ();
			SelectedDatesCollection s = new SelectedDatesCollection (list);			
			
			s.Add (DateTime.Today);
			s.Clear ();
			Assert.AreEqual (0, s.Count, "A1");
		}
Пример #3
0
		public void SelectRangeMethod ()
		{
			ArrayList list = new ArrayList ();
			SelectedDatesCollection s = new SelectedDatesCollection (list);			
			
			s.Add (DateTime.Today);
			s.Add (DateTime.Today);
			// Internally clears the list
			s.SelectRange (new DateTime (2000, 1, 1), new DateTime (2001, 1, 1));

			Assert.AreEqual (367, s.Count, "A1");
		}