internal VirtualMachine( IConfiguration config, IProcessRunner runner, IDiskPathGetter pathGetter, IDiskUuidGetter uuidGetter, string name) { _config = config; ProcessRunner = runner; _pathGetter = pathGetter; _uuidGetter = uuidGetter; Name = name; }
internal VirtualMachineFactory( IConfiguration config, IUnityContainer container, IProcessRunner runner, IDiskPathGetter pathGetter, IDiskUuidGetter uuidGetter) { _config = config; _container = container; _runner = runner; _pathGetter = pathGetter; _uuidGetter = uuidGetter; }
public async Task Throw_ArgumentEx_When_File_DoesNot_Exist() { // Arrange var test = new TestContainer(); const string FilePath = @"some\file\path.vhd"; test.FileSystem.Setup(m => m.FileExists(It.IsAny <string>())).Returns(true); test.FileSystem.Setup(m => m.FileExists(FilePath)).Returns(false); IDiskUuidGetter getter = test.RegisterAll().Resolve <DiskUuidGetter>(); // Act var ex = await TestAssistant.CatchExceptionAsync(getter.GetDiskUuidAsync(FilePath)); // Assert Assert.IsNotNull(ex); Assert.IsTrue(ex is ArgumentException); }