-
Notifications
You must be signed in to change notification settings - Fork 236
Expand file tree
/
Copy pathRange.ts
More file actions
37 lines (31 loc) · 1.17 KB
/
Range.ts
File metadata and controls
37 lines (31 loc) · 1.17 KB
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
30
31
32
33
34
35
36
37
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { assert } from "chai";
import { Range } from "../../../src/tasks/FileUploadTask/Range";
describe("Range.ts", () => {
describe("Constructor", () => {
const defaultValue = -1;
it("Should create a Range instance with given min and max values", () => {
const min = 1;
const max = 10;
const range = new Range(min, max);
assert.equal(range.minValue, min);
assert.equal(range.maxValue, max);
});
it("Should create a range instance with default values", () => {
const range = new Range();
assert.equal(range.minValue, defaultValue);
assert.equal(range.maxValue, defaultValue);
});
it("Should create a range instance with default max value", () => {
const min = 1;
const range = new Range(min);
assert.equal(range.minValue, min);
assert.equal(range.maxValue, defaultValue);
});
});
});