public void ExtractPartInfo_TwoActions()
        {
            string mockFileName = "User-Create-Edit.aspx";

            PartScanner scanner = new PartScanner();
            scanner.ControlLoader = new MockPartLoader(this, mockFileName);

            PartInfo[] infos = scanner.ExtractPartInfo(mockFileName);

            Assert.AreEqual(2, infos.Length, "Invalid number of parts found.");
        }
        public void Test_FindParts()
        {
            string appName = "MockApplication";

            PartScanner scanner = new PartScanner();
            scanner.ControlLoader = new MockPartLoader(this, String.Empty);
            scanner.FileNamer.FileMapper = new MockFileMapper(this, TestUtilities.GetTestingPath(this), appName);
            scanner.FileNamer.PartsDirectoryPath = TestUtilities.GetTestApplicationPath(this, appName) + Path.DirectorySeparatorChar + "Parts";

            CreateMockParts(scanner.FileNamer);

            PartInfo[] infos = scanner.FindParts();

            Assert.AreEqual(1, infos.Length, "Invalid number of parts found.");

            Assert.AreEqual("Create", infos[0].Action, "The action doesn't match.");
            Assert.AreEqual("User", infos[0].TypeName, "The type name doesn't match.");
        }