forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpProgressEventArgsTest.cs
More file actions
29 lines (25 loc) · 1021 Bytes
/
Copy pathHttpProgressEventArgsTest.cs
File metadata and controls
29 lines (25 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.TestCommon;
namespace System.Net.Http.Handlers
{
public class HttpProgressEventArgsTest
{
[Fact]
public void Constructor_Initializes()
{
// Arrange
int progressPercentage = 10;
object userState = new object();
long bytesTransferred = 10L * 1024 * 1024 * 1024;
long? totalBytes = 10L * 1024 * 1024 * 1024;
// Act
HttpProgressEventArgs args = new HttpProgressEventArgs(progressPercentage, userState, bytesTransferred, totalBytes);
// Assert
Assert.Equal(progressPercentage, args.ProgressPercentage);
Assert.Equal(userState, args.UserState);
Assert.Equal(bytesTransferred, args.BytesTransferred);
Assert.Equal(totalBytes, args.TotalBytes);
}
}
}