public void TestGetTypeInfo() { var info = scans.SelectMany(scan => scan.GetTypeInfo()).ToList(); var shouldNotContain = new TypeCompletionInfo("Console", "Internal"); info.ShouldNotContain(shouldNotContain, "The generated completion types of the .NET types should not contain the internal" + "Console.Internal class."); var shouldContain = new List <TypeCompletionInfo> { new TypeCompletionInfo("File", "System.IO"), new TypeCompletionInfo("Console", "System"), new TypeCompletionInfo("IEnumerable", "System.Collections"), }; foreach (var shouldContainItem in shouldContain) { info.ShouldContain(shouldContainItem, "The generated completion types of the .NET types should" + "contain basic types."); } var shouldContainAttribute = new TypeCompletionInfo("Serializable", "System"); info.ShouldContain(shouldContainAttribute, "Attribute classes should have their 'Attribute' prefix stripped off of them. "); var shouldContainAttributeLibrary = new TypeCompletionInfo("Test", "NUnit.Framework"); info.ShouldContain(shouldContainAttributeLibrary, "Attributes that don't directly extend Syste.Attribute should have the 'Attribute' prefix stripped off of them."); }
protected bool Equals(TypeCompletionInfo other) { return(string.Equals(Name, other.Name) && string.Equals(Namespace, other.Namespace)); }