/// <summary> /// Create the matching rule from the configuration data. /// </summary> /// <param name="context">Build context.</param> /// <param name="objectConfiguration">Configuration element object from config file.</param> /// <param name="configurationSource">Source of the configuration information.</param> /// <param name="reflectionCache">Unused.</param> /// <returns>Constructed <see cref="AssemblyMatchingRule"/>.</returns> public IMatchingRule Assemble(IBuilderContext context, MatchingRuleData objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) { AssemblyMatchingRuleData castedRuleData = (AssemblyMatchingRuleData)objectConfiguration; AssemblyMatchingRule matchingRule = new AssemblyMatchingRule(castedRuleData.Match); return(matchingRule); }
public void CanMatchAssemblyByFullyQualifiedName() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameByNameVersionAndCulture() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=4.0.0.0, Culture=neutral"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyByFullyQualifiedName() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameByNameVersionAndKey() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameByNameAndVersion() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.0.0"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanExplicitlyDenyMatchOnSpecificKey() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); Assert.IsFalse(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameUsingArbitraryAmountOfSpaces() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib,Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanExplicitlyDenyMatchOnVersion() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=1.2.3.4, Culture=neutral, PublicKeyToken=b77a5c561934e089"); Assert.IsFalse(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameByNameOnly() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanExplicitlyDenyMatchOnNoKey() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=(null)"); Assert.IsFalse(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameUsingArbitraryAmountOfSpaces() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib,Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanExplicitlyDenyMatchOnSpecificCulture() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.5.0, Culture=nl-NL, PublicKeyToken=7cec85d7bea7798e"); Assert.IsFalse(matchingRule.Matches(objectToStringMethod)); }
public void CanExplicitlyDenyMatchOnSpecificKey() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); Assert.IsFalse(matchingRule.Matches(objectToStringMethod)); }
public void CanExplicitlyDenyMatchOnNoKey() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=(null)"); Assert.IsFalse(matchingRule.Matches(objectToStringMethod)); }
public void CanExplicitlyDenyMatchOnSpecificCulture() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=4.0.0.0, Culture=nl-NL, PublicKeyToken=b77a5c561934e089"); Assert.IsFalse(matchingRule.Matches(objectToStringMethod)); }
public void CanExplicitlyDenyMatchOnSpecificCulture() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.0.0, Culture=nl-NL, PublicKeyToken=b77a5c561934e089"); Assert.IsFalse(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyByFullyQualifiedName() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameByNameAndVersion() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=4.0.0.0"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameByNameVersionAndCulture() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.0.0, Culture=neutral"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameByNameVersionAndKey() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=4.0.0.0, PublicKeyToken=b77a5c561934e089"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameUsingArbitraryAmountOfSpaces() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib,Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }
public void CanMatchAssemblyNameByNameVersionAndKey() { AssemblyMatchingRule matchingRule = new AssemblyMatchingRule("mscorlib, Version=2.0.5.0, PublicKeyToken=7cec85d7bea7798e"); Assert.IsTrue(matchingRule.Matches(objectToStringMethod)); }