public void shouldNotCacheUnusedMethodsAtRebuildUsingBuild() { var testee = new PipelineManager(this.scheme); testee.BuildPipeline(new TestSubject()); var nameOfShort = typeof(short).AssemblyQualifiedName; var nameOfInt = typeof(int).AssemblyQualifiedName; var nameOfTestSubj = typeof(TestSubject).AssemblyQualifiedName; var secondConfig = "{" + nameOfTestSubj + "; Add3; " + nameOfShort + "; " + nameOfShort + "; (0,2)}\n" + "{" + nameOfTestSubj + "; Square; " + nameOfShort + "; " + nameOfInt + "; (0,0)}\n" + "{" + nameOfTestSubj + "; Squareroot; " + nameOfInt + "; " + nameOfShort + "; (0,1)}\n" + "{" + nameOfTestSubj + "; Subtract3; " + nameOfShort + "; " + nameOfShort + "; (0,5)}\n"; var secondScheme = PipelineScheme.Parse(secondConfig); testee.BuildPipeline(secondScheme, new TestSubject()); var cacheCollection = testee.GetType().GetField("unusedSteps", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); var actualCollection = (Dictionary<StepMetadata, StepWrapper>)cacheCollection.GetValue(testee); Assert.IsTrue(actualCollection.IsNull() || actualCollection.Count == 0); }