public void GetShorthandTypeByName(string shorthandName, cUnitsController.eUnitTypeShorthand expectedResult) { cUnitsController.eUnitTypeShorthand result = cUnitsController.GetShorthandTypeByName(shorthandName); Assert.That(result, Is.EqualTo(expectedResult)); }
public void GetShorthandTypeByUnitsType_Static( cUnitsController.eUnitTypeStandard value, cUnitsController.eUnitTypeShorthand expectedResult) { cUnitsController.eUnitTypeShorthand result = cUnitsController.GetShorthandTypeByUnitsType(value); Assert.That(result, Is.EqualTo(expectedResult)); }
public void GetShorthandTypeByUnits_Static_None(string unitsAsString) { cUnits units = new cUnits(); units.ParseStringToUnits(unitsAsString); cUnitsController.eUnitTypeShorthand result = cUnitsController.GetShorthandTypeByUnits(units); Assert.That(result, Is.EqualTo(cUnitsController.eUnitTypeShorthand.None)); }
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)); }
public void GetShorthandTypeByUnits_Static_Speed( string unitsAsString, cUnitsController.eUnitTypeShorthand expectedResult) { cUnits units = new cUnits(); units.ParseStringToUnits(unitsAsString); cUnitsController.eUnitTypeShorthand result = cUnitsController.GetShorthandTypeByUnits(units); Assert.That(result, Is.EqualTo(expectedResult)); }
[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)); }