Exemple #1
0
 public void ShouldFailWhenAttachedWithoutRegion()
 {
     var ex = Assert.Throws <InvalidOperationException>(() =>
     {
         TestableRegionBehavior regionBehavior = new TestableRegionBehavior();
         regionBehavior.Attach();
     });
 }
        public void CannotChangeRegionAfterAttach()
        {
            TestableRegionBehavior regionBehavior = new TestableRegionBehavior();

            regionBehavior.Region = new MockPresentationRegion();

            regionBehavior.Attach();
            regionBehavior.Region = new MockPresentationRegion();
        }
Exemple #3
0
        public void CannotChangeRegionAfterAttach()
        {
            TestableRegionBehavior regionBehavior = new TestableRegionBehavior();

            regionBehavior.Region = new MockPresentationRegion();

            regionBehavior.Attach();
            regionBehavior.Region = new MockPresentationRegion();
        }
        public void CannotChangeRegionAfterAttach()
        {
            TestableRegionBehavior regionBehavior = new TestableRegionBehavior();

            regionBehavior.Region = new MockPresentationRegion();

            regionBehavior.Attach();
            Assert.ThrowsException<InvalidOperationException>(() => regionBehavior.Region = new MockPresentationRegion());
        }
        public void ShouldCallOnAttachWhenAttachMethodIsInvoked()
        {
            TestableRegionBehavior regionBehavior = new TestableRegionBehavior();

            regionBehavior.Region = new MockPresentationRegion();

            regionBehavior.Attach();

            Assert.IsTrue(regionBehavior.onAttachCalled);
        }
Exemple #6
0
        public void ShouldCallOnAttachWhenAttachMethodIsInvoked()
        {
            TestableRegionBehavior regionBehavior = new TestableRegionBehavior();

            regionBehavior.Region = new MockPresentationRegion();

            regionBehavior.Attach();

            Assert.IsTrue(regionBehavior.onAttachCalled);
        }
Exemple #7
0
        public void CannotChangeRegionAfterAttach()
        {
            var ex = Assert.Throws <InvalidOperationException>(() =>
            {
                TestableRegionBehavior regionBehavior = new TestableRegionBehavior();

                regionBehavior.Region = new MockPresentationRegion();

                regionBehavior.Attach();
                regionBehavior.Region = new MockPresentationRegion();
            });
        }
 public void ShouldFailWhenAttachedWithoutRegion()
 {
     TestableRegionBehavior regionBehavior = new TestableRegionBehavior();
     regionBehavior.Attach();
 }
Exemple #9
0
        public void ShouldFailWhenAttachedWithoutRegion()
        {
            TestableRegionBehavior regionBehavior = new TestableRegionBehavior();

            regionBehavior.Attach();
        }
 public void ShouldFailWhenAttachedWithoutRegion()
 {
     TestableRegionBehavior regionBehavior = new TestableRegionBehavior();
     Assert.ThrowsException<InvalidOperationException>(() => regionBehavior.Attach());
 }