Exemple #1
0
        public void ReturnsZeroForNonICanActivateDerivatives()
        {
            var canActivateViewFetcher = new CanActivateViewFetcher();
            var affinity = canActivateViewFetcher.GetAffinityForView(typeof(CanActivateViewFetcherTests));

            Assert.Equal(0, affinity);
        }
Exemple #2
0
        public void ReturnsPositiveForICanActivateDerivatives()
        {
            var canActivateViewFetcher = new CanActivateViewFetcher();
            var affinity = canActivateViewFetcher.GetAffinityForView(typeof(CanActivateStub));

            Assert.True(affinity > 0);
        }
Exemple #3
0
        public void CanNotFetchActivatorForNonCanActivateableForm()
        {
            var form = new TestFormNotCanActivate();
            var canActivateViewFetcher = new CanActivateViewFetcher();

            canActivateViewFetcher.GetActivationForView(form).AssertEqual(Observable.Return(false));
        }
Exemple #4
0
        public void CanGetActivationForViewForCanActivateableFormDeactivated()
        {
            var canActivateViewFetcher = new CanActivateViewFetcher();

            canActivateViewFetcher.GetActivationForView(new TestForm(2)).FirstAsync().AssertEqual(Observable.Return(false));
        }