Esempio n. 1
0
            public void WhenNullPackageSpecifiedReturnEmptyString()
            {
                var viewModel = new WelcomeViewModel(Mock.Of<IScreen>()) {
                    PackageMetadata = null
                };

                Assert.Equal("", viewModel.Title);
            }
Esempio n. 2
0
            public void WhenPackageSpecifiesNoTitleFallbackToId()
            {
                var package = Mock.Of<IPackage>(p => p.Id == "MyApp" && p.Title == "");

                var viewModel = new WelcomeViewModel(Mock.Of<IScreen>()) {
                    PackageMetadata = package
                };

                Assert.Equal("MyApp", viewModel.Title);
            }
Esempio n. 3
0
            public void WhenPackageSpecifiesATitleUseIt()
            {
                var package = Mock.Of<IPackage>(p => p.Title == "My App Title");

                var viewModel = new WelcomeViewModel(Mock.Of<IScreen>()) {
                    PackageMetadata = package
                };

                Assert.Equal("My App Title", viewModel.Title);
            }
Esempio n. 4
0
            public void WhenPackageSpecifiesValueItIsDisplayed()
            {
                var package = Mock.Of<IPackage>(p => p.Description == "My App Description");

                var viewModel = new WelcomeViewModel(Mock.Of<IScreen>())
                {
                    PackageMetadata = package
                };

                Assert.Equal("My App Description", viewModel.Description);
            }