public void Setup() { _module = Substitute.For <IGitModule>(); _module.GetGitDirectory().Returns(x => WorkingDir); _controller = new GitTagController(_module); }
public FormVerify([CanBeNull] GitUICommands commands) : base(commands) { InitializeComponent(); columnIsLostObjectSelected.Width = DpiUtil.Scale(20); columnDate.Width = DpiUtil.Scale(56); columnType.Width = DpiUtil.Scale(58); columnAuthor.Width = DpiUtil.Scale(150); columnHash.Width = DpiUtil.Scale(280); columnHash.MinimumWidth = DpiUtil.Scale(75); columnParent.Width = DpiUtil.Scale(280); columnParent.MinimumWidth = DpiUtil.Scale(75); _selectedItemsHeader.AttachTo(columnIsLostObjectSelected); InitializeComplete(); Warnings.AutoGenerateColumns = false; columnIsLostObjectSelected.DataPropertyName = "IsSelected"; // TODO this property is not on the bound type columnDate.DataPropertyName = nameof(LostObject.Date); columnType.DataPropertyName = nameof(LostObject.RawType); columnSubject.DataPropertyName = nameof(LostObject.Subject); columnAuthor.DataPropertyName = nameof(LostObject.Author); columnHash.DataPropertyName = nameof(LostObject.ObjectId); columnParent.DataPropertyName = nameof(LostObject.Parent); if (commands != null) { _gitTagController = new GitTagController(commands); } }
public FormCreateTag([CanBeNull] GitUICommands commands, [CanBeNull] ObjectId objectId) : base(commands) { InitializeComponent(); InitializeComplete(); annotate.Items.AddRange(new object[] { _trsLightweight.Text, _trsAnnotated.Text, _trsSignDefault.Text, _trsSignSpecificKey.Text }); annotate.SelectedIndex = 0; tagMessage.MistakeFont = new Font(SystemFonts.MessageBoxFont, FontStyle.Underline); commitPickerSmallControl1.UICommandsSource = this; if (IsUICommandsInitialized) { objectId = objectId ?? Module.GetCurrentCheckout(); if (objectId != null) { commitPickerSmallControl1.SetSelectedCommitHash(objectId.ToString()); } } if (commands != null) { _gitTagController = new GitTagController(commands); } }
public void Setup() { _tagMessageFile = Path.Combine(_workingDir, "TAGMESSAGE"); _fileSystem = Substitute.For <IFileSystem>(); _fileSystem.File.Returns(Substitute.For <FileBase>()); _controller = new GitTagController(() => _workingDir, _fileSystem); }
public void Setup() { _module = Substitute.For <IGitModule>(); _uiCommands = Substitute.For <IGitUICommands>(); _module.GetGitDirectory().Returns(x => WorkingDir); _fileSystem = Substitute.For <IFileSystem>(); _fileSystem.File.Returns(Substitute.For <FileBase>()); _controller = new GitTagController(_uiCommands, _module, _fileSystem); }
public void Setup() { _tagMessageFile = Path.Combine(_workingDir, "TAGMESSAGE"); _module = Substitute.For <IGitModule>(); _uiCommands = Substitute.For <IGitUICommands>(); _module.GetGitDirectory().Returns(x => _workingDir); _fileSystem = Substitute.For <IFileSystem>(); _fileSystem.File.Returns(Substitute.For <FileBase>()); _controller = new GitTagController(_uiCommands, _module, _fileSystem); }
public FormVerify(GitUICommands aCommands) : base(aCommands) { InitializeComponent(); _selectedItemsHeader.AttachTo(columnIsLostObjectSelected); Translate(); Warnings.AutoGenerateColumns = false; if (aCommands != null) { _gitTagController = new GitTagController(aCommands, aCommands.Module); } }
public FormCreateTag(GitUICommands aCommands, GitRevision revision) : base(aCommands) { InitializeComponent(); Translate(); tagMessage.MistakeFont = new Font(SystemFonts.MessageBoxFont, FontStyle.Underline); commitPickerSmallControl1.UICommandsSource = this; if (IsUICommandsInitialized) { commitPickerSmallControl1.SetSelectedCommitHash(revision == null ? Module.GetCurrentCheckout() : revision.Guid); } if (aCommands != null) { _gitTagController = new GitTagController(() => aCommands.Module.WorkingDir); } }
public FormCreateTag(GitUICommands commands, GitRevision revision) : base(commands) { InitializeComponent(); Translate(); annotate.Items.AddRange(DropwdownTagOperation); annotate.SelectedIndex = 0; tagMessage.MistakeFont = new Font(SystemFonts.MessageBoxFont, FontStyle.Underline); commitPickerSmallControl1.UICommandsSource = this; if (IsUICommandsInitialized) { commitPickerSmallControl1.SetSelectedCommitHash(revision == null ? Module.GetCurrentCheckout() : revision.Guid); } if (commands != null) { _gitTagController = new GitTagController(commands); } }
public FormCreateTag([NotNull] GitUICommands commands, [CanBeNull] ObjectId objectId) : base(commands) { InitializeComponent(); InitializeComplete(); annotate.Items.AddRange(new object[] { _trsLightweight.Text, _trsAnnotated.Text, _trsSignDefault.Text, _trsSignSpecificKey.Text }); annotate.SelectedIndex = 0; tagMessage.MistakeFont = new Font(tagMessage.MistakeFont, FontStyle.Underline); if (objectId is not null && objectId.IsArtificial) { objectId = null; } objectId ??= Module.GetCurrentCheckout(); if (objectId is not null) { commitPickerSmallControl1.SetSelectedCommitHash(objectId.ToString()); } _gitTagController = new GitTagController(commands); }