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); }
public void GetWorkPermit_Expired() { var result = Ex3.GetWorkPermit(_employees, "Tom"); Assert.AreEqual(None, result); }