public void GetAssemblyTitleForAssemblyWithNoAttributes() { var assembly = Substitute.For <ICustomAttributeProvider>(); var title = AssemblyUtilities.GetAssemblyTitle(assembly, "MyAssembly"); title.Should().NotBeNullOrWhiteSpace(); title.Should().Be("MyAssembly"); }
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"); }