public void GetShorthandTypeByUnitsType_Static( cUnitsController.eUnitTypeStandard value, cUnitsController.eUnitTypeShorthand expectedResult) { cUnitsController.eUnitTypeShorthand result = cUnitsController.GetShorthandTypeByUnitsType(value); Assert.That(result, Is.EqualTo(expectedResult)); }
public void SetTypeByShorthand_Without_Schema_Types_Defined( cUnitsController.eUnitTypeShorthand value, cUnitsController.eUnitTypeStandard result) { cUnitsController unitsController = new cUnitsController(); unitsController.SetTypeByShorthand(value); Assert.That(unitsController.Type, Is.EqualTo(result)); }
[TestCase(cUnitsController.eUnitTypeShorthand.SpeedAngular, "Displacement (Rotation)", cUnitsController.eUnitTypeStandard.DisplacementRotational)] // TODO: This should not be allowed public void SetTypeByShorthand_With_Schema_Types_Defined( cUnitsController.eUnitTypeShorthand value, string schema, cUnitsController.eUnitTypeStandard result) { // TODO: Limit schema types to appropriate sub-categories. cUnitsController unitsController = new cUnitsController(); unitsController.SetTypeByShorthand(value, schema); Assert.That(unitsController.Type, Is.EqualTo(result)); }
public void SetTypeByDescription_Of_Existing_Description_Changes_Type( string value, cUnitsController.eUnitTypeStandard result) { cUnitsController unitsController = new cUnitsController(); Assert.That(unitsController.Type, Is.EqualTo(cUnitsController.eUnitTypeStandard.None)); unitsController.SetTypeByDescription(value); Assert.That(unitsController.Type, Is.EqualTo(result)); }