private static IEnumerable<PascalUnit> BuildUnits()
        {
            var unit = new PascalUnit(TestConstants.WindowsUnit,
                                      TestConstants.PathNotImportant);
            unit.AddUnitNames(
                new[]
                    {
                        TestConstants.MessagesUnit
                    }
                );
            yield return unit;
            unit = new PascalUnit(TestConstants.MessagesUnit,
                                  TestConstants.PathNotImportant);
            unit.AddUnitNames(
                new[]
                    {
                        TestConstants.ClassesUnit
                    }
                );

            yield return unit;
        }
예제 #2
0
 internal static PascalUnit CreateUnitWithoutPath(string name)
 {
     if (!IsUnitNameValid(name))
     {
         return CreateInvalidUnit(name);
     }
     var unitWithoutPath = new PascalUnit(name,NotFoundInFilesystem) {IsFoundInFileSystem = false};
     Debug.Assert(!unitWithoutPath.IsFoundInFileSystem);
     return unitWithoutPath;
 }
예제 #3
0
 public bool HasSameUnitNameAs(PascalUnit other)
 {
     return UnitNameLowered.Equals(other.UnitNameLowered);
 }