public void TestNewTypePattern() { Assert.AreEqual(PatternMatching.TypePattern(Rectangle), 20); Assert.Throws <ArgumentException>(() => PatternMatching.TypePattern(Square)); }