Enums and inheritance in .Net
In one of my current projects I had the following code (I simplified the code a bit): public string ConnectionString { get { switch(this.Importer) { case Importer.SqlServer: return "Server=localhost;Database=Northwind"; case Importer.SqlServerOleDb: return"Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind"; default: throw new NotSupportedException( string.Format("Importer {0} is not supported yet.", this.Importer)); } } } After running the code coverage tool (dotCover from JetBrains) I received the following picture: First idea So, my code was clear and understandable, but obviously not fully tested (green: covered by tests,…