public void SelectFrom()
 {
     using (NamerFactory.AsEnvironmentSpecificTest(() => GetType().Name))
     {
         Approvals.Verify(sqlDialect.BuildSelectFromCommand("TheTableName")("1 = 1"));
     }
 }
 public void Update()
 {
     using (NamerFactory.AsEnvironmentSpecificTest(() => GetType().Name))
     {
         Approvals.Verify(sqlDialect.BuildUpdateCommand("TransitionalName", "TheTableName"));
     }
 }
Beispiel #3
0
 public void TheoryAsEnvironmentSpecificTest(object arg)
 {
     using (NamerFactory.AsEnvironmentSpecificTest(() => "Bar"))
     {
         Approvals.Verify(arg);
     }
 }
 public void GetBySagaId()
 {
     using (NamerFactory.AsEnvironmentSpecificTest(() => GetType().Name))
     {
         Approvals.Verify(sqlDialect.BuildGetBySagaIdCommand("TheTableName"));
     }
 }
Beispiel #5
0
 public void AsEnvironmentSpecificTest()
 {
     using (NamerFactory.AsEnvironmentSpecificTest(() => "Foo"))
     {
         Approvals.Verify("Value");
     }
 }
Beispiel #6
0
    public IldasmTests()
    {
#if DEBUG
        disposable = NamerFactory.AsEnvironmentSpecificTest(() => "Debug" + ApprovalResults.GetDotNetRuntime(true));
#else
        disposable = NamerFactory.AsEnvironmentSpecificTest(() => "Release" + ApprovalResults.GetDotNetRuntime(true));
#endif
    }
Beispiel #7
0
    public void RemoveBySagaId()
    {
        var timeoutCommands = TimeoutCommandBuilder.Build(sqlDialect, "TheTablePrefix");

        using (NamerFactory.AsEnvironmentSpecificTest(() => GetType().Name))
        {
            Approvals.Verify(timeoutCommands.RemoveBySagaId);
        }
    }
    public void Unsubscribe()
    {
        var timeoutCommands = SubscriptionCommandBuilder.Build(sqlDialect, "TheTablePrefix");

        using (NamerFactory.AsEnvironmentSpecificTest(() => GetType().Name))
        {
            Approvals.Verify(timeoutCommands.Unsubscribe);
        }
    }
    public ModuleWeaverTests(ITestOutputHelper output) :
        base(output)
    {
#if DEBUG
        disposable = NamerFactory.AsEnvironmentSpecificTest(() => "Debug" + ApprovalResults.GetDotNetRuntime(true));
#else
        disposable = NamerFactory.AsEnvironmentSpecificTest(() => "Release" + ApprovalResults.GetDotNetRuntime(true));
#endif
    }
        public void TestDataSourceNames()
        {
            NamerFactory.Clear();
            var exception =
                ExceptionUtilities.GetException(
                    () => RdlcApprovals.VerifyReport(ReportName, GetAssembly(), "purposelyMisspelt", GetDefaultData()));

            Approvals.Verify(exception.Message);
        }
Beispiel #11
0
 public static IDisposable BuildForRuntime()
 {
     #if (NETCOREAPP)
     var description = "netcore";
     #else
     var description = "netclassic";
     #endif
     return(NamerFactory.AsEnvironmentSpecificTest(() => description));
 }
    public void Store()
    {
        var timeoutCommands = OutboxCommandBuilder.Build("TheTablePrefix", sqlDialect);

        using (NamerFactory.AsEnvironmentSpecificTest(() => GetType().Name))
        {
            Approvals.Verify(timeoutCommands.Store);
        }
    }
Beispiel #13
0
        private static void AssertLauncher(string approved, string received, GenericDiffReporter reporter)
        {
            try
            {
                ApprovalResults.UniqueForMachineName();
                var args = reporter.GetLaunchArguments(approved, received);

                Approvals.VerifyWithCallback(args, s => StartProcess(s));
            }
            finally
            {
                NamerFactory.Clear();
            }
        }
Beispiel #14
0
 public static IDisposable BuildForRuntimeAndConfig()
 {
     #if (NETCOREAPP)
     var description = "netcore";
     #else
     var description = "netclassic";
     #endif
     #if (RELEASE)
     description += "_release";
     #else
     description += "_debug";
     #endif
     return(NamerFactory.AsEnvironmentSpecificTest(() => description));
 }
Beispiel #15
0
        protected static void TestView(UserControl view)
        {
            var border = new Border {
                Background = Brushes.White, Child = view
            };

            var host = new ContentControl
            {
                Width   = 400,
                Height  = 400,
                Content = border
            };

            PrepareForRender(host);

            NamerFactory.Clear();

            Approvals.Verify(new ImageWriter(f => WpfUtils.ScreenCapture(host, f)));
        }