コード例 #1
0
        public void PackLibraryResources_LibraryProject()
        {
            RunTarget(LibraryProject, TargetName.PackLibraryResources);
            var embeddedResources = LibraryProject.GetEvaluatedItemsByName("EmbeddedResource").ToArray();

            Assert.AreEqual(13, embeddedResources.Length, "#1");
        }
コード例 #2
0
        public void UnpackLibraryResources_LibraryProject()
        {
            // We should not unpack any EmbeddedResources into BundleResources
            RunTarget(LibraryProject, TargetName.Build);
            var bundleResources = LibraryProject.GetEvaluatedItemsByName("_BundleResourceWithLogicalName").ToArray();

            Assert.AreEqual(11, bundleResources.Length, "#1");
        }
コード例 #3
0
        public void BuildLibrary_NoInterfaceDefinitions()
        {
            foreach (var item in LibraryProject.GetEvaluatedItemsByName("InterfaceDefinition"))
            {
                LibraryProject.RemoveItem((Microsoft.Build.BuildEngine.BuildItem)item);
            }

            BuildLibraryCore(ExpectedLibraryEmbeddedResources.Where(s => !s.Contains("storyboardc")).ToArray());
        }
コード例 #4
0
        public void GetReferencedAssemblies_Library()
        {
            RunTarget(LibraryProject, TargetName.ResolveReferences);
            var references = LibraryProject.GetEvaluatedItemsByName("ReferencePath").ToArray();

            Assert.AreEqual(5, references.Length, "#1");
            Assert.IsTrue(references.Any(t => t.Include.Contains("System")), "#2a");
            Assert.IsTrue(references.Any(t => t.Include.Contains("System.Xml")), "#2b");
            Assert.IsTrue(references.Any(t => t.Include.Contains("System.Core")), "#2c");
            Assert.IsTrue(references.Any(t => t.Include.Contains("mscorlib")), "#2d");
            Assert.IsTrue(references.Any(t => t.Include.Contains("Xamarin.iOS")), "#2e");
        }