@@ -28,15 +28,53 @@ public void ConstructorImplementedCorrectly()
28
28
[ InlineData ( 0 , 0 , 0 , 0 , 1 , 0 , 0 ) ]
29
29
[ InlineData ( 0 , 0 , 0 , 0 , 0 , 1 , 0 ) ]
30
30
[ InlineData ( 0 , 0 , 0 , 0 , 0 , 0 , 1 ) ]
31
- public void IsBaseQuantityImplementedProperly ( int length , int mass , int time , int current , int temperature , int amount , int luminousIntensity )
31
+ public void IsBaseQuantity_ForBaseQuantity_ReturnsTrue ( int length , int mass , int time , int current , int temperature , int amount , int luminousIntensity )
32
32
{
33
33
var baseDimensions = new BaseDimensions ( length , mass , time , current , temperature , amount , luminousIntensity ) ;
34
- var derivedDimensions = new BaseDimensions ( length * 2 , mass * 2 , time * 2 , current * 2 , temperature * 2 , amount * 2 , luminousIntensity * 2 ) ;
35
-
36
34
Assert . True ( baseDimensions . IsBaseQuantity ( ) ) ;
35
+ }
36
+
37
+ [ Theory ]
38
+ [ InlineData ( 2 , 0 , 0 , 0 , 0 , 0 , 0 ) ]
39
+ [ InlineData ( 0 , 2 , 0 , 0 , 0 , 0 , 0 ) ]
40
+ [ InlineData ( 0 , 0 , 2 , 0 , 0 , 0 , 0 ) ]
41
+ [ InlineData ( 0 , 0 , 0 , 2 , 0 , 0 , 0 ) ]
42
+ [ InlineData ( 0 , 0 , 0 , 0 , 2 , 0 , 0 ) ]
43
+ [ InlineData ( 0 , 0 , 0 , 0 , 0 , 2 , 0 ) ]
44
+ [ InlineData ( 0 , 0 , 0 , 0 , 0 , 0 , 2 ) ]
45
+ public void IsBaseQuantity_ForDerivedQuantity_ReturnsFalse ( int length , int mass , int time , int current , int temperature , int amount , int luminousIntensity )
46
+ {
47
+ var derivedDimensions = new BaseDimensions ( length , mass , time , current , temperature , amount , luminousIntensity ) ;
48
+ Assert . False ( derivedDimensions . IsBaseQuantity ( ) ) ;
49
+ }
50
+
51
+ [ Theory ]
52
+ [ InlineData ( 1 , 1 , 0 , 0 , 0 , 0 , 0 ) ]
53
+ [ InlineData ( 0 , 2 , 1 , 0 , 0 , 0 , 0 ) ]
54
+ [ InlineData ( 0 , 2 , 1 , 1 , 0 , 0 , 0 ) ]
55
+ [ InlineData ( 1 , 2 , 1 , 1 , 1 , 1 , 1 ) ]
56
+ [ InlineData ( 0 , 0 , 1 , 2 , - 2 , 0 , 0 ) ]
57
+ [ InlineData ( 0 , 0 , 2 , - 1 , 0 , 0 , 0 ) ]
58
+ [ InlineData ( 0 , 0 , 0 , - 3 , 1 , 0 , 0 ) ]
59
+ [ InlineData ( 0 , 0 , 0 , 0 , - 4 , - 4 , 0 ) ]
60
+ public void IsBaseQuantity_ForMultipleDimensions_ReturnsFalse ( int length , int mass , int time , int current , int temperature , int amount , int luminousIntensity )
61
+ {
62
+ var derivedDimensions = new BaseDimensions ( length , mass , time , current , temperature , amount , luminousIntensity ) ;
37
63
Assert . False ( derivedDimensions . IsBaseQuantity ( ) ) ;
38
64
}
39
65
66
+ [ Fact ]
67
+ public void IsBaseQuantity_ForDimensionless_ReturnsFalse ( )
68
+ {
69
+ Assert . False ( BaseDimensions . Dimensionless . IsBaseQuantity ( ) ) ;
70
+ }
71
+
72
+ [ Fact ]
73
+ public void IsBaseQuantity_ForAcceleration_ReturnsFalse ( )
74
+ {
75
+ Assert . False ( Acceleration . BaseDimensions . IsBaseQuantity ( ) ) ;
76
+ }
77
+
40
78
[ Theory ]
41
79
[ InlineData ( 2 , 0 , 0 , 0 , 0 , 0 , 0 ) ]
42
80
[ InlineData ( 0 , 2 , 0 , 0 , 0 , 0 , 0 ) ]
0 commit comments