public void UpdateAction_sets_z() { var fixture = new SevenZipSettingsFixture(); var sut = new SwitchUpdateOptions { Z = UpdateAction.Ignore }; const string expected = "-uz0"; var actual = fixture.Parse(b => sut.BuildArguments(ref b)); actual.ShouldBe(expected); }
public void UpdateAction_sets_NewName() { var fixture = new SevenZipSettingsFixture(); var sut = new SwitchUpdateOptions { NewArchiveName = new Core.IO.FilePath("foo.zip") }; const string expected = "-u!\"foo.zip\""; var actual = fixture.Parse(b => sut.BuildArguments(ref b)); actual.ShouldBe(expected); }
public void UpdateAction_sets_CombinedValues() { var fixture = new SevenZipSettingsFixture(); var sut = new SwitchUpdateOptions { P = UpdateAction.Ignore, Q = UpdateAction.Compress, R = UpdateAction.Copy, X = UpdateAction.Anti, Y = UpdateAction.Ignore, Z = UpdateAction.Compress, W = UpdateAction.Copy, NewArchiveName = new Core.IO.FilePath("foo.zip") }; const string expected = "-up0q2r1x3y0z2w1!\"foo.zip\""; var actual = fixture.Parse(b => sut.BuildArguments(ref b)); actual.ShouldBe(expected); }