public void ParseUnit() { try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("cm⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("cm^6", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("dm⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("dm^6", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("ft⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("ft^6", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("in⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("in^6", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("m⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("m^6", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("mm⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("mm^6", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } }