Пример #1
0
        public void TestAdd()
        {
            EventCatalogSingleton EventTest = new EventCatalogSingleton();
            Event Eventet = new Event(DateTime.Now, 1, "Beskrivelse", "Navn", "Sted");
            EventTest.Add(Eventet);

            Assert.AreEqual(true, EventTest.Events.Contains(Eventet));
        }
Пример #2
0
        public static EventCatalogSingleton GetInstance()
        {
            if (Instance == null)
            {
                Instance = new EventCatalogSingleton();
            }

            return(Instance);
        }
Пример #3
0
 public void TestSize()
 {
     EventCatalogSingleton EventTest = new EventCatalogSingleton();
     Assert.AreEqual(2, EventTest.Events.Count);
 }