Exemplo n.º 1
0
        public void TijdConstructor()
        {
            Tijd tijdstip = new Tijd(11, 45);

            Assert.AreEqual(11, tijdstip.Uren);
            Assert.AreEqual(45, tijdstip.Minuten);
        }
Exemplo n.º 2
0
        public void IntToTijd()
        {
            int a = 5;

            Tijd result = a;

            Assert.AreEqual(new Tijd(0, 5), result);
        }
Exemplo n.º 3
0
        public void TijdPlus5()
        {
            Tijd t1 = new Tijd(3, 15);

            Tijd result = t1 + 5;

            Assert.AreEqual(new Tijd(3, 20), result);
        }
Exemplo n.º 4
0
        public void Tijd70Plus()
        {
            Tijd t1 = new Tijd(3, 15);

            Tijd result = (Tijd)70 + t1;

            Assert.AreEqual(new Tijd(4, 25), result);
        }
Exemplo n.º 5
0
        public void Tijd5Plus()
        {
            Tijd t1 = new Tijd(3, 15);

            Tijd result = (Tijd)5 + t1;

            Assert.AreEqual(new Tijd(3, 20), result);
        }
Exemplo n.º 6
0
        public void TijdenOptellen2()
        {
            Tijd t1 = new Tijd(3, 15);
            Tijd t2 = new Tijd(2, 45);

            Tijd result = t1 + t2;

            Assert.AreEqual(new Tijd(6, 00), result);
        }
Exemplo n.º 7
0
        public void TijdenVergelijken()
        {
            Tijd t1 = new Tijd(11, 45);
            Tijd t2 = new Tijd(11, 45);

            bool result = t1.Equals(t2);

            Assert.IsTrue(result);
        }
Exemplo n.º 8
0
        public void TijdPlusVijfentwintig()
        {
            Tijd tijdstip = new Tijd(11, 45);

            Tijd nieuwTijdstip = tijdstip.PlusMinuten(25);

            Assert.AreEqual(12, nieuwTijdstip.Uren);
            Assert.AreEqual(10, nieuwTijdstip.Minuten);
        }
Exemplo n.º 9
0
        public void TijdPlusVijf()
        {
            Tijd tijdstip = new Tijd(11, 45);

            Tijd nieuwTijdstip = tijdstip.PlusMinuten(5);

            Assert.AreEqual(11, nieuwTijdstip.Uren);
            Assert.AreEqual(50, nieuwTijdstip.Minuten);
        }
Exemplo n.º 10
0
        public void TijdIncrementBefore()
        {
            Tijd t1 = new Tijd(11, 45);

            Tijd t2 = ++t1;

            Assert.AreEqual(new Tijd(11, 46), t1);
            Assert.AreEqual(new Tijd(11, 46), t2);
        }
Exemplo n.º 11
0
        public void TijdIncrement()
        {
            Tijd t1 = new Tijd(11, 45);

            Tijd t2 = t1++;

            Assert.AreEqual(new Tijd(11, 46), t1);
            Assert.AreEqual(new Tijd(11, 45), t2);
        }
Exemplo n.º 12
0
        public void TijdenOngelijk()
        {
            Tijd t1 = new Tijd(11, 45);
            Tijd t2 = new Tijd(11, 46);

            bool result = t1 != t2;

            Assert.IsTrue(result);
        }
Exemplo n.º 13
0
        public void TijdenGetHashcodeTest()
        {
            Tijd t1 = new Tijd(11, 45);
            Tijd t2 = new Tijd(11, 45);

            int h1 = t1.GetHashCode();
            int h2 = t2.GetHashCode();

            Assert.IsTrue(h1 == h2);
        }
Exemplo n.º 14
0
 public static int AddTijd(int ploegid, int blokid, DateTime time)
 {
     using (TimechasersEntities te = new TimechasersEntities())
     {
         Tijd tijd = te.Tijd.Add(new Tijd()
         {
             PloegID = ploegid,
             BlokID  = blokid,
             Tijd1   = time
         });
         te.SaveChanges();
         return(tijd.Id);
     }
 }
Exemplo n.º 15
0
        public override string ToString()
        {
            string s = "";

            s += "Tafel: " + TafelId + "            Tijd: " + Tijd.ToString("HH:mm") + "\n\n";
            foreach (BesteldeMenuItems m in besteldeItems)
            {
                s += m.Aantal + "x    " + m.MenuItem.Naam + "\n";
                if (m.Opmerking != "")
                {
                    s += "!!!" + m.Opmerking + "!!!" + "\n";
                }
            }

            return(s);
        }