예제 #1
0
 public void TestWinMerge()
 {
     using (ApprovalResults.UniqueForMachineName())
     {
         AssertLauncher("../../a.txt", "../../b.txt", WinMergeReporter.INSTANCE);
     }
 }
예제 #2
0
 public void TestControlApproved()
 {
     ApprovalResults.UniqueForMachineName();
     WinFormsApprovals.Verify(new Button {
         BackColor = Color.LightBlue, Text = "Help"
     });
 }
예제 #3
0
 public void TestLaunchesVisualStudio()
 {
     using (ApprovalResults.UniqueForMachineName())
     {
         AssertLauncher("../../a.txt", "../../b.txt", VisualStudioReporter.INSTANCE);
     }
 }
 private static void AssertLauncher(string approved, string received, GenericDiffReporter reporter)
 {
     using (ApprovalResults.UniqueForMachineName())
     {
         var args = reporter.GetLaunchArguments(approved, received);
         Approvals.VerifyWithCallback(args, s => StartProcess(s));
     }
 }
예제 #5
0
        public void TestUniqueNames()
        {
            ApprovalResults.UniqueForMachineName();
            var methods = new Func <string>[] {
                ApprovalResults.GetDotNetVersion,
                ApprovalResults.GetOsName,
                ApprovalResults.GetUserName
            };

            Approvals.VerifyAll(
                methods,
                m => "{0} => {1}".FormatWith(m.Method.Name, m.Invoke()));
        }
        public void TestUniqueNames()
        {
            ApprovalResults.UniqueForMachineName();
            var methods = new Func <string>[]
            {
                //ApprovalResults.GetDotNetVersion,
                ApprovalResults.GetOsName,
                ApprovalResults.GetUserName
            };

            Approvals.VerifyAll(
                methods,
                m => $"{m.Method.Name} => {m.Invoke()}");
        }
예제 #7
0
        public void TestUniqueNames()
        {
            var machinesToRun = new[] { "LLEWELLYN-PC", "LLEWELLYNWINDOW" };

            if (!machinesToRun.Contains(Environment.MachineName))
            {
                Assert.Inconclusive($"Machine name '{Environment.MachineName}' not in allowed list: {string.Join(", ", machinesToRun)}. See ApprovalTestsConfig.cs");
            }

            ApprovalResults.UniqueForMachineName();
            var methods = new Func <string>[]
            {
                //ApprovalResults.GetDotNetVersion,
                ApprovalResults.GetOsName,
                ApprovalResults.GetUserName
            };

            Approvals.VerifyAll(
                methods,
                m => $"{m.Method.Name} => {m.Invoke()}");
        }
예제 #8
0
 public void ExitsBeforeNamerIsCalled()
 {
     using (ApprovalResults.UniqueForMachineName())
     {
     }
 }
예제 #9
0
 public void TestFormApproval()
 {
     ApprovalResults.UniqueForMachineName();
     WinFormsApprovals.Verify(new Form());
 }
예제 #10
0
 public void NamerSetUp()
 {
     ApprovalResults.UniqueForMachineName();
 }
예제 #11
0
 public void Setup()
 {
     ApprovalResults.UniqueForMachineName();
 }