public ChangeLogEntryFooter(CommitMessageFooterName name, string value) { if (String.IsNullOrWhiteSpace(value)) { throw new ArgumentException("Value must not be null or whitespace", nameof(value)); } Name = name; Value = value; }
public void Constructor_initializes_properties() { // ARRANGE var name = new CommitMessageFooterName("Some-Name"); var value = "some value"; // ACT var sut = new ChangeLogEntryFooter(name, value); // ASSERT Assert.Equal(name, sut.Name); Assert.Equal(value, sut.Value); }
public void FromCommitMessageFooter_returns_expected_footer() { // ARRANGE var name = new CommitMessageFooterName("Some-Name"); var value = "some value"; var commitMessageFooter = new CommitMessageFooter(name, value); // ACT var sut = ChangeLogEntryFooter.FromCommitMessageFooter(commitMessageFooter); // ASSERT Assert.Equal(name, sut.Name); Assert.Equal(value, sut.Value); }