Пример #1
0
        public void DebuggerProxy_FrameworkTypes_SpinLock2()
        {
            var obj = new MockDesktopSpinLock(true);

            var str = s_formatter.FormatObject(obj, SingleLineOptions);

            Assert.Equal("MockDesktopSpinLock(IsHeld = false) { IsHeld=false, IsHeldByCurrentThread=true, OwnerThreadID=0 }", str);

            str = s_formatter.FormatObject(obj, SeparateLinesOptions);
            AssertMembers(str, "MockDesktopSpinLock(IsHeld = false)",
                          "IsHeld: false",
                          "IsHeldByCurrentThread: true",
                          "OwnerThreadID: 0"
                          );
        }
Пример #2
0
        public void DebuggerProxy_FrameworkTypes_SpinLock1()
        {
            var obj = new MockDesktopSpinLock(false);

            var str = s_formatter.FormatObject(obj, SingleLineOptions);

            Assert.Equal("MockDesktopSpinLock(IsHeld = false) { IsHeld=false, IsHeldByCurrentThread=!<InvalidOperationException>, OwnerThreadID=null }", str);

            str = s_formatter.FormatObject(obj, SeparateLinesOptions);
            AssertMembers(str, "MockDesktopSpinLock(IsHeld = false)",
                          "IsHeld: false",
                          "IsHeldByCurrentThread: !<InvalidOperationException>",
                          "OwnerThreadID: null"
                          );
        }