public void GetMatcher_ReturnsMatcherForProvidedTargets() { var targets = new[] { TestDataFactory.CreateSetupTarget(() => Console.WriteLine()), TestDataFactory.CreateSetupTarget(() => Console.ReadLine()) }; var subject = new RewriteTargetCollection(targets); var matcher = subject.GetMatcher(TestDataFactory.CreateModuleDefinition()); var result0 = matcher.GetMatchingTargets(CecilUtility.Import(targets[0].Methods[0])); var result1 = matcher.GetMatchingTargets(CecilUtility.Import(targets[1].Methods[0])); Assert.AreEqual(targets[0], result0.Single()); Assert.AreEqual(targets[1], result1.Single()); }