Ejemplo n.º 1
0
        public void GetAssemblyTitleForAssemblyWithNoAttributes()
        {
            var assembly = Substitute.For <ICustomAttributeProvider>();
            var title    = AssemblyUtilities.GetAssemblyTitle(assembly, "MyAssembly");

            title.Should().NotBeNullOrWhiteSpace();
            title.Should().Be("MyAssembly");
        }
Ejemplo n.º 2
0
        public void GetAssemblyTitleForAssemblyWithOnlyCompany()
        {
            var assembly = Substitute.For <ICustomAttributeProvider>();

            assembly.GetCustomAttributes(typeof(AssemblyCompanyAttribute), true).Returns(new object[] { new AssemblyCompanyAttribute("MyCompany") });

            var title = AssemblyUtilities.GetAssemblyTitle(assembly, "MyAssembly");

            title.Should().Be("MyCompany MyAssembly");
        }