Пример #1
0
        public static TestUniverse RestartCKli(this TestUniverse universe)
        {
            string         tempName = "temp";
            NormalizedPath tempZip  = ImageManager.CacheUniverseFolder.AppendPart(tempName + ".zip");

            File.Delete(tempZip);
            universe.SnapshotState(tempName).Should().Be(tempZip);
            return(ImageManager.InstantiateImage(TestHelper.Monitor, tempZip));
        }
Пример #2
0
 public static NormalizedPath minimal_solution_setup(Action <TestUniverse> action, bool useless)
 {
     using (TestUniverse universe = ImageManager.InstantiateImage(
                m: TestHelper.Monitor,
                imagePath: ImageManager.SeedUniverseFolder.AppendPart("minimal_project.zip"))
            )
     {
         universe.SeedInitialSetup(TestHelper.Monitor);
         var snapshotPath = universe.SnapshotState(nameof(minimal_solution_setup));
         action?.Invoke(universe);
         return(snapshotPath);
     }
 }
Пример #3
0
 static NormalizedPath ImageBuilderHelper(
     Action <TestUniverse> action,
     bool refreshCache,
     Func <Action <TestUniverse>, bool, NormalizedPath> parentBuilder,
     Action <TestUniverse> buildAction,
     [CallerMemberName] string callerMemberName = null)
 {
     using (TestUniverse universe = ImageManager.InstantiateImage(TestHelper.Monitor, parentBuilder, refreshCache))
     {
         buildAction(universe);
         var snapshotPath = universe.SnapshotState(callerMemberName);
         action?.Invoke(universe);
         return(snapshotPath);
     }
 }