예제 #1
0
        public void Constructor_ValueAsPageGuid_SetsPageGuidProperty()
        {
            var guid     = Guid.NewGuid();
            var metadata = new ProjectDesignerPageMetadata(guid, 0, hasConfigurationCondition: false);

            Assert.Equal(guid, metadata.PageGuid);
        }
        public async Task GetPagesAsync_ReturnsPagesInOrder()
        {
            var provider = CreateInstance();
            var pages    = await provider.GetPagesAsync();

            ProjectDesignerPageMetadata[] expectedPages = new ProjectDesignerPageMetadata[]
            {
                CSharpProjectDesignerPage.Application,
                CSharpProjectDesignerPage.Build,
                CSharpProjectDesignerPage.BuildEvents,
                CSharpProjectDesignerPage.Debug,
                CSharpProjectDesignerPage.Signing,
            };

            Assert.Equal(expectedPages.Length, pages.Count());
            for (int i = 0; i < pages.Count; i++)
            {
                Assert.Same(expectedPages[i], pages.ElementAt(i));
            }
        }
예제 #3
0
        public void Constructor_ValueAsHasConfigurationCondition_SetsHasConfigurationConditionProperty(bool hasConfigurationCondition)
        {
            var metadata = new ProjectDesignerPageMetadata(Guid.NewGuid(), 0, hasConfigurationCondition: hasConfigurationCondition);

            Assert.Equal(hasConfigurationCondition, metadata.HasConfigurationCondition);
        }
예제 #4
0
        public void Constructor_ValueAsPageOrder_SetsPageOrderProperty(int pageOrder)
        {
            var metadata = new ProjectDesignerPageMetadata(Guid.NewGuid(), pageOrder, hasConfigurationCondition: false);

            Assert.Equal(pageOrder, metadata.PageOrder);
        }