Beispiel #1
0
 private void AssertCharacteristicsEqual(ComponentCharacteristic savedCh, ComponentCharacteristic loadedCh)
 {
     Assert.That(loadedCh, Is.Not.Null);
     Assert.That(savedCh.ComponentType, Is.EqualTo(loadedCh.ComponentType));
     Assert.That(savedCh.FormattingPattern, Is.EqualTo(loadedCh.FormattingPattern));
     Assert.That(savedCh.Name, Is.EqualTo(loadedCh.Name));
 }
 public override CharacteristicValue CreateRandomValue(ComponentCharacteristic characteristic)
 {
     return(((StringCharacteristic)characteristic).CreateValue(Guid.NewGuid().ToString()));
 }
Beispiel #3
0
 public override CharacteristicValue CreateRandomValue(ComponentCharacteristic characteristic)
 {
     return(((BoolCharacteristic)characteristic).CreateValue(RandomBool()));
 }
 public void EstablishContext()
 {
     _characteristic      = new Mock <ComponentCharacteristic>().Object;
     _characteristicValue = CreateCharacteristicWithSpecifiedDefaults();
 }
 public FakeCharacteristicValue(ComponentCharacteristic characteristic)
     : base(characteristic)
 {
 }
Beispiel #6
0
 public abstract CharacteristicValue CreateRandomValue(ComponentCharacteristic characteristic);
 public override CharacteristicValue CreateRandomValue(ComponentCharacteristic characteristic)
 {
     return(((NumericCharacteristic)characteristic).CreateValue(Random.Next()));
 }