Beispiel #1
0
        public void GetWorkPermit_Valid()
        {
            var result = Ex3.GetWorkPermit(_employees, "Nathan");
            var permit = result.Match(
                () => new WorkPermit(),
                (x) => x);

            Assert.AreEqual(new DateTime(2080, 1, 1), permit.Expiry);
        }
Beispiel #2
0
        public void GetWorkPermit_Expired()
        {
            var result = Ex3.GetWorkPermit(_employees, "Tom");

            Assert.AreEqual(None, result);
        }