Exemplo n.º 1
0
 public void StartPosition_UsingGetter_ReturnsValueSpecifiedAtConstruction()
 {
     const int expectedValue = 10;
     var map = new Map("int", "Int32");
     var patternHit = new PatternHit(expectedValue, map);
     Assert.AreEqual(expectedValue, patternHit.StartPosition);
 }
Exemplo n.º 2
0
 public void ReplaceWith_ConstructedWithAMapContainingTheCLRTypeString_ReturnsValueString()
 {
     var map = new Map("string", "String");
     var patternHit = new PatternHit(10, map);
     Assert.AreEqual("String", patternHit.ReplaceWith);
 }
Exemplo n.º 3
0
 public void ClrType_UsingGetter_ReturnsValueSpecifiedAtConstruction()
 {
     const String expectedValue = "Int32";
     var map = new Map("int", expectedValue);
     Assert.AreEqual(expectedValue, map.ClrType);
 }
Exemplo n.º 4
0
 public void CharsToReplace_ConstructedWithAMapContainingA3CharacterAlias_ReturnsTheNumber3()
 {
     var map = new Map("int", "Int32");
     var patternHit = new PatternHit(10, map);
     Assert.AreEqual(3, patternHit.CharsToReplace);
 }
Exemplo n.º 5
0
 public void Alias_UsingGetter_ReturnsValueSpecifiedAtConstruction()
 {
     const String expectedValue = "int";
     var map = new Map(expectedValue, "Int32");
     Assert.AreEqual(expectedValue, map.Alias);
 }