public void TestProjectItemWithoutLicenseHeaderFile() { Solution solution = MockRepository.GenerateMock <Solution>(); solution.Expect(x => x.FullName).Return(@"d:\projects\Stuff.sln"); DTE dte = MockRepository.GenerateMock <DTE>(); dte.Expect(x => x.Solution).Return(solution); ProjectItems projectItems = MockRepository.GenerateMock <ProjectItems>(); ProjectItem linkedFile = MockRepository.GenerateMock <ProjectItem>(); linkedFile.Expect(x => x.DTE).Return(dte); projectItems.Expect(x => x.Parent).Return(new object()); linkedFile.Expect(x => x.Collection).Return(projectItems); solution.Expect(x => x.FindProjectItem("linkedFile.cs")).Return(linkedFile); linkedFile.Expect(x => x.Name).Return("linkedFile.cs"); linkedFile.Expect(x => x.Properties).Return(null); LinkedFileFilter linkedFileFilter = new LinkedFileFilter(solution); linkedFileFilter.Filter(new List <ProjectItem> { linkedFile }); Assert.IsEmpty(linkedFileFilter.ToBeProgressed); Assert.IsNotEmpty(linkedFileFilter.NoLicenseHeaderFile); Assert.IsEmpty(linkedFileFilter.NotInSolution); }