@@ -75,6 +75,7 @@ public void ThrowsOnIncompatibleUnits()
75
75
Assert . Throws < Exception > ( ( ) => UnitConverter . Convert ( 1 , Unit . Pascal , Unit . Second ) ) ;
76
76
Assert . Throws < Exception > ( ( ) => UnitConverter . Convert ( 1 , Unit . Kilogram , Unit . Second ) ) ;
77
77
Assert . Throws < Exception > ( ( ) => UnitConverter . Convert ( 1 , Unit . CubicMeter , Unit . Second ) ) ;
78
+ Assert . Throws < Exception > ( ( ) => UnitConverter . Convert ( 1 , Unit . Degree , Unit . Second ) ) ;
78
79
}
79
80
80
81
[ Test ]
@@ -87,12 +88,13 @@ public void TryConvertReturnsFalseOnIncompatibleUnits()
87
88
Assert . False ( UnitConverter . TryConvert ( 1 , Unit . Pascal , Unit . Second , out newValue ) ) ;
88
89
Assert . False ( UnitConverter . TryConvert ( 1 , Unit . Kilogram , Unit . Second , out newValue ) ) ;
89
90
Assert . False ( UnitConverter . TryConvert ( 1 , Unit . CubicMeter , Unit . Second , out newValue ) ) ;
91
+ Assert . False ( UnitConverter . TryConvert ( 1 , Unit . Degree , Unit . Second , out newValue ) ) ;
90
92
91
93
// Assert to-unit cases. One for each class of unit.
92
94
Assert . False ( UnitConverter . TryConvert ( 1 , Unit . Second , Unit . Meter , out newValue ) ) ;
93
95
Assert . False ( UnitConverter . TryConvert ( 1 , Unit . Second , Unit . Pascal , out newValue ) ) ;
94
96
Assert . False ( UnitConverter . TryConvert ( 1 , Unit . Second , Unit . Kilogram , out newValue ) ) ;
95
- Assert . False ( UnitConverter . TryConvert ( 1 , Unit . Second , Unit . CubicMeter , out newValue ) ) ;
97
+ Assert . False ( UnitConverter . TryConvert ( 1 , Unit . Second , Unit . Degree , out newValue ) ) ;
96
98
}
97
99
}
98
100
}
0 commit comments