public void SetTypeByDescription_Of_NonExisting_Description_Changes_Type_To_None() { cUnitsController unitsController = new cUnitsController(); Assert.That(unitsController.Type, Is.EqualTo(cUnitsController.eUnitTypeStandard.None)); unitsController.SetTypeByDescription("FooBar"); Assert.That(unitsController.Type, Is.EqualTo(cUnitsController.eUnitTypeStandard.None)); unitsController.SetTypeByDescription("Displacement (Rotation)"); Assert.That(unitsController.Type, Is.EqualTo(cUnitsController.eUnitTypeStandard.DisplacementRotational)); unitsController.SetTypeByDescription("FooBar"); Assert.That(unitsController.Type, Is.EqualTo(cUnitsController.eUnitTypeStandard.None)); }
public void IsShorthandTypesAvailable(string value, bool isShorthandTypesAvailable) { cUnitsController unitsController = new cUnitsController(); unitsController.SetTypeByDescription(value); Assert.That(unitsController.IsShorthandTypesAvailable(), Is.EqualTo(isShorthandTypesAvailable)); }
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)); }