mirror of https://github.com/dahall/Vanara.git
Updated tests and corrected found errors in Vanara.BITS
parent
61931b1e83
commit
99ba5422b9
|
@ -307,7 +307,7 @@ namespace Vanara.IO
|
|||
/// be set before the first call to IBackgroundCopyJob::Resume that starts the job.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[DefaultValue(null)]
|
||||
[DefaultValue("GET")]
|
||||
public string HttpMethod
|
||||
{
|
||||
get => RunAction(() => IHttpOp2.GetHttpMethod());
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace Vanara.IO
|
|||
|
||||
static Version GetVer()
|
||||
{
|
||||
var fi = System.Diagnostics.FileVersionInfo.GetVersionInfo(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "qmgr.dll"));
|
||||
var fi = System.Diagnostics.FileVersionInfo.GetVersionInfo(Environment.ExpandEnvironmentVariables(@"%WinDir%\sysnative\qmgr.dll"));
|
||||
return $"{fi.FileMajorPart}.{fi.FileMinorPart}" switch
|
||||
{
|
||||
"7.8" when fi.FileBuildPart >= 18362 => new Version(10, 3),
|
||||
|
|
|
@ -50,6 +50,9 @@ namespace Vanara.IO.Tests
|
|||
Assert.That(() => job.HighPerformance = true, Throws.Nothing);
|
||||
Assert.That(job.HighPerformance, Is.EqualTo(true));
|
||||
|
||||
Assert.That(job.HttpMethod, Is.EqualTo(job.GetDefVal<string>(nameof(job.HttpMethod))));
|
||||
Assert.That(() => job.MakeCustomHeadersWriteOnly(), Throws.Nothing);
|
||||
|
||||
Assert.That(job.ID, Is.Not.EqualTo(Guid.Empty));
|
||||
|
||||
Assert.That(job.JobType, Is.EqualTo(BackgroundCopyJobType.Download));
|
||||
|
@ -90,7 +93,6 @@ namespace Vanara.IO.Tests
|
|||
Assert.That(() => job.OnDemand = true, Throws.Nothing);
|
||||
Assert.That(job.OnDemand, Is.EqualTo(true));
|
||||
|
||||
|
||||
using var identity = WindowsIdentity.GetCurrent();
|
||||
Assert.That(job.Owner, Is.EqualTo(identity.User));
|
||||
|
||||
|
|
Loading…
Reference in New Issue