本文整理汇总了C#中ICSharpCode.PackageManagement.Design.FakePackageManagementProject类的典型用法代码示例。如果您正苦于以下问题:C# FakePackageManagementProject类的具体用法?C# FakePackageManagementProject怎么用?C# FakePackageManagementProject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FakePackageManagementProject类属于ICSharpCode.PackageManagement.Design命名空间,在下文中一共展示了FakePackageManagementProject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateInstallActionWithNoPowerShellScripts
void CreateInstallActionWithNoPowerShellScripts()
{
var fakeProject = new FakePackageManagementProject();
fakeAction = new FakeInstallPackageAction(fakeProject);
fakeAction.Operations = new PackageOperation[0];
fakeActions.Add(fakeAction);
}
示例2: CreateAction
void CreateAction()
{
fakePackageManagementEvents = new FakePackageManagementEvents();
fakeProject = new FakePackageManagementProject();
action = new InstallPackageAction(fakeProject, fakePackageManagementEvents);
installPackageHelper = new InstallPackageHelper(action);
}
示例3: CreateInstallAction
FakeInstallPackageAction CreateInstallAction()
{
var project = new FakePackageManagementProject();
var action = new FakeInstallPackageAction(project);
action.Operations = new PackageOperation[0];
return action;
}
示例4: AddInstallAction
FakeInstallPackageAction AddInstallAction()
{
var project = new FakePackageManagementProject();
var action = new FakeInstallPackageAction(project);
actionsToRun.AddAction(action);
return action;
}
示例5: CreateSolution
void CreateSolution()
{
fakePackageManagementEvents = new FakePackageManagementEvents();
fakeProject = new FakePackageManagementProject();
action = new UpdatePackageAction(fakeProject, fakePackageManagementEvents);
updatePackageHelper = new UpdatePackageHelper(action);
}
示例6: CreateAction
void CreateAction()
{
fakeProject = new FakePackageManagementProject();
fakeScriptFactory = new FakePackageScriptFactory();
fakeScriptRunner = new FakePackageScriptRunner();
action = new RunPackageScriptsAction(fakeProject, fakeScriptRunner, fakeScriptFactory);
}
示例7: AddAction
InstallPackageAction AddAction()
{
var project = new FakePackageManagementProject();
var events = new FakePackageManagementEvents();
var action = new InstallPackageAction(project, events);
actions.AddAction(action);
return action;
}
示例8: TestableProcessPackageAction
public TestableProcessPackageAction(
FakePackageManagementProject project,
FakePackageManagementEvents packageManagementEvents)
: base(project, packageManagementEvents)
{
FakeProject = project;
FakePackageManagementEvents = packageManagementEvents;
this.Package = FakePackage;
}
示例9: FakePackageManagementProjectFactory
public FakePackageManagementProjectFactory()
{
CreatePackageManagementProject = (sourceRepository, project) => {
RepositoriesPassedToCreateProject.Add(sourceRepository);
ProjectsPassedToCreateProject.Add(project);
var fakeProject = new FakePackageManagementProject();
FakeProjectsCreated.Add(fakeProject);
return fakeProject;
};
}
示例10: CreateAction
void CreateAction()
{
fakeProject = new FakePackageManagementProject();
fakeScriptFactory = new FakePackageScriptFactory();
fakeScriptRunner = new FakePackageScriptRunner();
globalMSBuildProjectCollection = MockRepository.GenerateStub<IGlobalMSBuildProjectCollection>();
action = new RunPackageScriptsAction(
fakeProject,
fakeScriptRunner,
fakeScriptFactory,
globalMSBuildProjectCollection);
}
示例11: Execute_MethodCalled_RunPackageScriptsActionCreatedUsingProject
public void Execute_MethodCalled_RunPackageScriptsActionCreatedUsingProject()
{
CreateAction();
var expectedProject = new FakePackageManagementProject();
action.Project = expectedProject;
action.PackageScriptRunner = new FakePackageScriptRunner();
action.Execute();
var actualProject = action.ProjectPassedToCreateRunPackageScriptsAction;
Assert.AreEqual(expectedProject, actualProject);
}
示例12: Execute_PackageInstallDirectoryIsSet_ProjectSessionVariableIsSet
public void Execute_PackageInstallDirectoryIsSet_ProjectSessionVariableIsSet()
{
CreateScript();
var expectedProject = new TestableDTEProject();
var project = new FakePackageManagementProject();
project.DTEProject = expectedProject;
script.Project = project;
ExecuteScript();
var projectVariable = fakeSession.VariablesAdded["__project"];
Assert.AreEqual(expectedProject, projectVariable);
}
示例13: CreateScript
void CreateScript()
{
fakeFileSystem = new FakeFileSystem();
fakeFileSystem.FileExistsReturnValue = true;
fakeFileSystem.DirectoryExistsReturnValue = true;
scriptFileName = new PackageUninstallScriptFileName(fakeFileSystem);
fakeSession = new FakePackageScriptSession();
fakePackage = new FakePackage();
fakeProject = new FakePackageManagementProject();
script = new PackageUninstallScript(fakePackage, scriptFileName);
script.Project = fakeProject;
}
示例14: GetInstalledPackages_PackageInstalledInProjectAndProjectIsSelected_ReturnsPackageInstalledInProject
public void GetInstalledPackages_PackageInstalledInProjectAndProjectIsSelected_ReturnsPackageInstalledInProject()
{
CreateFakeSolution();
List<IProject> projectsAddedToSolution = AddSolutionWithTwoProjectsToProjectService();
fakeSolution.FakeActiveMSBuildProject = projectsAddedToSolution[0];
fakeSolution.FakeActiveMSBuildProject.Name = "MyProject";
var package = new FakePackage("Test");
var project = new FakePackageManagementProject("MyProject");
project.FakePackages.Add(package);
fakeSolution.FakeProjectsToReturnFromGetProject.Add("MyProject", project);
CreateSelectedProjects();
var repository = new FakePackageRepository();
IQueryable<IPackage> packages = selectedProjects.GetPackages(repository);
var expectedPackages = new FakePackage[] {
package
};
PackageCollectionAssert.AreEqual(expectedPackages, packages);
}
示例15: ProjectHasPackageInstalled
static FakePackage ProjectHasPackageInstalled(FakePackageManagementProject project, string packageId, string version)
{
FakePackage package = project.FakeLocalRepository.AddFakePackageWithVersion(packageId, version);
project.FakePackages.Add(package);
return package;
}