public void Null() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); pe.SetAsText(null); ITransactionAttributeSource tas = pe.Value; MethodInfo m = typeof(object).GetMethod("GetHashCode"); Assert.IsTrue(tas.ReturnTransactionAttribute(m, null) == null); }
public void Null() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); pe.SetAsText(null); ITransactionAttributeSource tas = pe.Value; MethodInfo m = typeof(object).GetMethod("GetHashCode"); Assert.IsTrue(tas.ReturnTransactionAttribute(m, null) == null); }
public void MatchesAll() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); pe.SetAsText("System.Object.*, Mscorlib=PROPAGATION_REQUIRED"); ITransactionAttributeSource tas = pe.Value; checkTransactionProperties(tas, typeof(object).GetMethod("GetHashCode"), TransactionPropagation.Required); checkTransactionProperties(tas, typeof(object).GetMethod("Equals", new Type[] { typeof(object) }),TransactionPropagation.Required); checkTransactionProperties(tas, typeof(object).GetMethod("GetType"), TransactionPropagation.Required); checkTransactionProperties(tas, typeof(object).GetMethod("ToString"), TransactionPropagation.Required); }
public void MatchesAll() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); pe.SetAsText("System.Object.*, Mscorlib=PROPAGATION_REQUIRED"); ITransactionAttributeSource tas = pe.Value; checkTransactionProperties(tas, typeof(object).GetMethod("GetHashCode"), TransactionPropagation.Required); checkTransactionProperties(tas, typeof(object).GetMethod("Equals", new Type[] { typeof(object) }), TransactionPropagation.Required); checkTransactionProperties(tas, typeof(object).GetMethod("GetType"), TransactionPropagation.Required); checkTransactionProperties(tas, typeof(object).GetMethod("ToString"), TransactionPropagation.Required); }
public void MatchesSpecific() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); pe.SetAsText("System.Object.GetHashCode, Mscorlib =PROPAGATION_REQUIRED\n" + "System.Object.Equals, Mscorlib =PROPAGATION_MANDATORY\n" + "System.Object.*pe, Mscorlib=PROPAGATION_SUPPORTS"); ITransactionAttributeSource tas = pe.Value; checkTransactionProperties(tas, typeof(object).GetMethod("GetHashCode"), TransactionPropagation.Required); checkTransactionProperties(tas, typeof(object).GetMethod("Equals", new Type[] { typeof(object) }),TransactionPropagation.Mandatory); checkTransactionProperties(tas, typeof(object).GetMethod( "GetType" ), TransactionPropagation.Supports); checkTransactionProperties(tas, typeof(object).GetMethod("ToString") ); }
public void MatchesSpecific() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); pe.SetAsText("System.Object.GetHashCode, Mscorlib =PROPAGATION_REQUIRED\n" + "System.Object.Equals, Mscorlib =PROPAGATION_MANDATORY\n" + "System.Object.*pe, Mscorlib=PROPAGATION_SUPPORTS"); ITransactionAttributeSource tas = pe.Value; checkTransactionProperties(tas, typeof(object).GetMethod("GetHashCode"), TransactionPropagation.Required); checkTransactionProperties(tas, typeof(object).GetMethod("Equals", new Type[] { typeof(object) }), TransactionPropagation.Mandatory); checkTransactionProperties(tas, typeof(object).GetMethod("GetType"), TransactionPropagation.Supports); checkTransactionProperties(tas, typeof(object).GetMethod("ToString")); }
public void Invalid() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); pe.SetAsText("foo=bar"); }
public void Invalid() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); Assert.Throws<ArgumentException>(() => pe.SetAsText("foo=bar")); }
public void Invalid() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); Assert.Throws <ArgumentException>(() => pe.SetAsText("foo=bar")); }
public void Invalid() { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); pe.SetAsText("foo=bar"); }