public void ExecutePropertyMember() { Facts.Assert(Context.Property(FileProperties.ReceivedFileName).WithValue("token.csv")); ExecutePolicy(); Facts.Verify(Context.Property(BizTalkFactoryProperties.CorrelationToken).WithValue("computed value!").HasBeenWritten()); }
public void BooleanPredicateResolution() { Facts.Assert(Context.Property(BtsProperties.AckRequired).WithValue(true)); ExecutePolicy(); Facts.Verify(Context.Property(BtsProperties.ReceivePortName).WithValue("AckRequired").HasBeenWritten()); }
public void NotEqualToStringResolution() { Facts.Assert(Context.Property(BtsProperties.ReceiveLocationName).WithValue("ActualReceiveLocationName")); ExecutePolicy(); Facts.Verify(Context.Property(BtsProperties.ReceivePortName).WithValue("NotEqualToString").HasBeenWritten()); }
public void NotEqualToIntegerResolution() { Facts.Assert(Context.Property(BtsProperties.ActualRetryCount).WithValue(2)); ExecutePolicy(); Facts.Verify(Context.Property(BtsProperties.ReceivePortName).WithValue("NotEqualToInteger").HasBeenWritten()); }
public void StaticConstResolution() { Facts.Assert(Context.Property(BtsProperties.AckRequired).WithValue(true)); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue(Dummy.Processes.Three).HasBeenWritten()); }
public void UnqualifiedFieldResolution() { Facts.Assert(Context.Property(BtsProperties.SuppressRoutingFailureDiagnosticInfo).WithValue(true)); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue(Dummy.Processes.Four).HasBeenWritten()); }
public void IndirectAccess() { Facts.Assert(Context.Property(FileProperties.ReceivedFileName).WithValue("some-accessViaVariable-file.csv")); ExecutePolicy(); Facts.Verify(Context.Property(BizTalkFactoryProperties.SenderName).WithValue("variableValue").HasBeenPromoted()); }
public void QualifiedPropertyResolution() { Facts.Assert(Context.Property(BtsProperties.IsRequestResponse).WithValue(true)); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue(Dummy.Processes.One).HasBeenWritten()); }
public void ExecuteRule() { Facts.Assert(Context.Property(BtsProperties.MessageType).WithValue("WriteFromContext")); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue("WriteFromContext").HasBeenWritten()); }
public void StaticCallResolution() { Facts.Assert(Context.Property(BizTalkFactoryProperties.CorrelationToken).WithValue("StaticCallResolution")); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue("HelloFromStaticCallResolution").HasBeenWritten()); }
public void StaticPropertyResolution() { Facts.Assert(Context.Property(BizTalkFactoryProperties.CorrelationToken).WithValue("StaticPropertyResolution")); ExecutePolicy(); Facts.Verify(Context.Property(FileProperties.FileCreationTime).WithValue(DateTime.Today).HasBeenWritten()); }
public void NegationResolution() { Facts.Assert(Context.Property(BtsProperties.AckRequired).WithValue(false)); ExecutePolicy(); Facts.Verify(Context.Property(BtsProperties.ReceivePortName).WithValue("NotAckRequired").HasBeenWritten()); }
public void ExecuteConstantToLambdaToExpressionRule() { Facts.Assert(Context.Property(FileProperties.ReceivedFileName).WithValue("no-folder-file.csv")); ExecutePolicy(); Facts.Verify(Context.Property(BizTalkFactoryProperties.OutboundTransportLocation).WithValue("folder/no-folder-file.csv").HasBeenWritten()); }
public void NegationResolutionWhenBoolPropertyIsMissingFromFactBase() { // Asserting a false boolean is useless as it will be assumed to be false // Facts.Assert(Context.Property(BtsProperties.AckRequired).WithValue(false)); ExecutePolicy(); Facts.Verify(Context.Property(BtsProperties.ReceivePortName).WithValue("NotAckRequired").HasBeenWritten()); }
public void ExtensionMethodResolution() { Facts .Assert(Context.Property(BizTalkFactoryProperties.CorrelationToken).WithValue("ExtensionMethodResolution")) .Assert(Context.Property(BizTalkFactoryProperties.SenderName).WithValue("0000001234567890")); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue("00001234567890").HasBeenWritten()); }
public void TypeMemberAccessRule() { Facts.Assert(Context.Property(BtsProperties.MessageType).WithValue(Schema <btf2_envelope> .MessageType)); ExecutePolicy(); Facts .Verify(Context.Property(BizTalkFactoryProperties.ReceiverName).WithValue("ControlBasedBatcher").HasBeenPromoted()) .Verify(Context.Property(BizTalkFactoryProperties.EnvelopeSpecName).WithValue(typeof(btf2_envelope).AssemblyQualifiedName).HasBeenPromoted()); }
public void ProcessTwoResolution() { Facts .Assert(Context.Property(BtsProperties.MessageType).WithValue("Z_IDOC#TWO")) .Assert(Context.Property(BtsProperties.InboundTransportType).WithValue("WCF-SAP")); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue(Dummy.Processes.Two).HasBeenWritten()); }
public void NoResolution() { Facts .Assert(Context.Property(BtsProperties.MessageType).WithValue("UNKNOWN")) .Assert(Context.Property(BtsProperties.InboundTransportType).WithValue("WCF-SAP")); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).HasNotBeenSet()); }
public void ProcessTenBResolution() { Facts .Assert(Context.Property(BtsProperties.MessageType).WithValue("Z_IDOC#TEN")) .Assert(Context.Property(BizTalkFactoryProperties.CorrelationToken).WithValue("Z2UMD_392_DEM_CAN")); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue("ProcessTen").HasBeenWritten()); }
public void ClearingFactList() { Facts.Assert(Context.Property(BtsProperties.MessageType).WithValue("message-type")); RuleEngine.Facts.Clear(); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).HasNotBeenSet()); }
public void WithoutClearingFactList() { Facts.Assert(Context.Property(BtsProperties.MessageType).WithValue("message-type")); ExecutePolicy(); Assert.That( () => Facts.Verify(Context.Property(TrackingProperties.ProcessName).HasNotBeenSet()), Throws.TypeOf <MockException>()); }
public void MessageTypeResolution() { Facts.Assert(Context.Property(BtsProperties.MessageType).WithValue(Schema <btf2_services_header> .MessageType)); ExecutePolicy(); Facts .Verify(Context.Property(BizTalkFactoryProperties.CorrelationToken).WithValue(Schema <btf2_envelope> .MessageType).HasBeenWritten()) .Verify(Context.Property(BizTalkFactoryProperties.EnvelopeSpecName).WithValue(new SchemaMetadata <btf2_envelope>().DocumentSpec.DocSpecStrongName).HasBeenWritten()) .Verify(Context.Property(BizTalkFactoryProperties.EnvelopeSpecName).WithValue(Schema <btf2_envelope> .AssemblyQualifiedName).HasBeenWritten()); }
public void TransformTypeResolution() { Facts .Assert(Context.Property(BtsProperties.MessageType).WithValue("Z_IDOC#SIX")) .Assert(Context.Property(BtsProperties.InboundTransportType).WithValue("WCF-SAP")); ExecutePolicy(); Facts .Verify(Context.Property(TrackingProperties.ProcessName).WithValue(Dummy.Processes.One).HasBeenWritten()) .Verify(Context.Property(BizTalkFactoryProperties.MapTypeName).WithValue(Transform <TransformBase> .MapTypeName).HasBeenWritten()); }
public void ExecuteRule() { ExecutePolicy(); Facts.Verify(Context.Property(BtsProperties.ReceivePortName).WithValue("AlwaysTrue").HasBeenWritten()); }
public void WriteProcessNameInContext() { ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue(Factory.Areas.Claim.Processes.Check).HasBeenWritten()); }
public void DoNotWriteProcessNameInContext() { Facts.Assert(Context.Property(TrackingProperties.ProcessName).WithValue("some-process-name")); ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithAnyValue().HasNotBeenWritten()); }
public void ImplicitBoxingIsHandledDuringTranslation() { ExecutePolicy(); Facts.Verify(Context.Property(BizTalkFactoryProperties.CorrelationToken).WithAnyValue().HasBeenWritten()); }
public void WriteProcessNameInContext() { ExecutePolicy(); Facts.Verify(Context.Property(TrackingProperties.ProcessName).WithValue(Default.Processes.Failed).HasBeenWritten()); }