Esempio n. 1
0
        public void TargetNotFound_ThreeElementArray()
        {
            var karate = new Karate();

            var result = karate.Chop(0, new int[] { 1, 3, 5 });

            Assert.AreEqual(-1, result);
        }
Esempio n. 2
0
        public void TestMethod1()
        {
            var karate = new Karate();

            var result = karate.Chop(3, new int[] { });

            Assert.AreEqual(-1, result);
        }
Esempio n. 3
0
        public void TargetFoundAtIndex2_ThreeElementArray()
        {
            var karate = new Karate();

            var result = karate.Chop(5, new int[] { 1, 3, 5 });

            Assert.AreEqual(2, result);
        }
Esempio n. 4
0
        public void TargetFoundAtIndex0_SingleElementArray()
        {
            var karate = new Karate();

            var result = karate.Chop(1, new int[] { 1 });

            Assert.AreEqual(0, result);
        }
Esempio n. 5
0
        public void TargetNotFound_SingleElementArray()
        {
            var karate = new Karate();

            var result = karate.Chop(3, new int[] { 1 });

            Assert.AreEqual(-1, result);
        }
Esempio n. 6
0
        public void TargetNotFound_EmptyArray()
        {
            var karate = new Karate();

            var result = karate.Chop(3, new int[] { });

            Assert.AreEqual(-1, result);
        }
Esempio n. 7
0
        public BookingHandler()
        {
            col                 = new Collector();
            _fitness            = new ObservableCollection <Event>();
            _yoga               = new ObservableCollection <Event>();
            _salsa              = new ObservableCollection <Event>();
            _karate             = new ObservableCollection <Event>();
            _zumba              = new ObservableCollection <Event>();
            _ballet             = new ObservableCollection <Event>();
            _poledance          = new ObservableCollection <Event>();
            _eventListSingleton = EventListSingleton.GetInstance();
            _eventListSingleton.SetEvents(col.Events);

            foreach (var Event in _eventListSingleton.GetDates())
            {
                if (Event.Type == "Fitness")
                {
                    Fitness.Add(Event);
                }
                if (Event.Type == "Yoga")
                {
                    Yoga.Add(Event);
                }
                if (Event.Type == "Salsa")
                {
                    Salsa.Add(Event);
                }
                if (Event.Type == "Pole dance")
                {
                    Poledance.Add(Event);
                }
                if (Event.Type == "Ballet")
                {
                    Ballet.Add(Event);
                }
                if (Event.Type == "Zumba")
                {
                    Zumba.Add(Event);
                }
                if (Event.Type == "Karate")
                {
                    Karate.Add(Event);
                }
            }
        }