public void ListOfNonClassNamesForAdapters_ShouldNotBeRecognizedAsAdapters() { List <string> stringsNotBeingClassNameForAnyAdapter = new List <string>() { null, "", " ", " x ", "abc", // this test class i.e. the below "this" does not implement // the interface so therefore 'Assert.IsFalse' below this.GetType().FullName }; foreach (string stringNotBeingClassNameForAnyAdapter in stringsNotBeingClassNameForAnyAdapter) { Assert.IsFalse( crsTransformationAdapterLeafFactory.IsCrsTransformationAdapter( stringNotBeingClassNameForAnyAdapter ) , "Should not have been recognized as adapter : " + stringNotBeingClassNameForAnyAdapter ); } }
public void FactoryWithOnlyTwoLeafs_ShouldOnlyRecognizeDotSpatialAndProjNet() { Assert.IsTrue( factoryWithOnlyTheTwoLeafsDotSpatialAndProjNet.IsCrsTransformationAdapter( classNameDotSpatial ) ); Assert.IsTrue( factoryWithOnlyTheTwoLeafsDotSpatialAndProjNet.IsCrsTransformationAdapter( classNameProjNet ) ); Assert.IsFalse( factoryWithOnlyTheTwoLeafsDotSpatialAndProjNet.IsCrsTransformationAdapter( classNameMightyLittleGeodesy ) ); // false above for MightyLittleGeodesy // for the factory with only two leafs // and below just testing the same MightyLittleGeodesy // but for the factory with all leafs // to verify it is true Assert.IsTrue( crsTransformationAdapterLeafFactory.IsCrsTransformationAdapter( classNameMightyLittleGeodesy ) ); }