public void References() { var references = typeof(CecilAssemblyTest).Assembly.GetReferencedAssemblies().Select(a => a.FullName); Assert.That(CecilAssemblyTest.GetAssembly().References.Select(r => r.Identifier), Is.EquivalentTo(references)); }
public void Equals(bool same) { var assembly1 = CecilAssemblyTest.GetAssembly(); var assembly2 = same ? CecilAssemblyTest.GetAssembly() : CecilAssemblyTest.GetOtherAssembly(); Assert.That(assembly1.Equals(assembly2), Is.EqualTo(same)); Assert.That(assembly1 == assembly2, Is.EqualTo(same)); Assert.That(assembly1 != assembly2, Is.EqualTo(!same)); }
public void Version() { var expected = typeof(CecilAssemblyTest).Assembly.GetName().Version; Assert.That(CecilAssemblyTest.GetAssembly().Version, Is.EqualTo(expected)); }
public void Types() { Assert.That(CecilAssemblyTest.GetAssembly().Types, Has.Some.Matches <Type>(t => t.Identifier == typeof(CecilAssemblyTest).FullName)); }
public void Name() { Assert.That(CecilAssemblyTest.GetAssembly().Name, Is.EqualTo(typeof(CecilAssemblyTest).Assembly.GetName().Name)); }
public void FileName() { Assert.That(CecilAssemblyTest.GetAssembly().FileName, Is.EqualTo(typeof(CecilAssemblyTest).Assembly.Location)); }
public void Attributes() { Assert.That(CecilAssemblyTest.GetAssembly().Attributes, Has.Some.Matches <Attribute>(attribute => attribute.Type.Identifier == typeof(TargetFrameworkAttribute).FullName)); }