From 5beee22a67ccdd969955b93b935e2f2f86cb6c74 Mon Sep 17 00:00:00 2001 From: bezzad Date: Fri, 20 Sep 2024 10:56:45 +0330 Subject: [PATCH] fixed arithmetic expressions should declare precedence to increase readability of codes. --- src/Downloader.Test/UnitTests/ChunkDownloaderTest.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Downloader.Test/UnitTests/ChunkDownloaderTest.cs b/src/Downloader.Test/UnitTests/ChunkDownloaderTest.cs index 63c5448..8d2e22e 100644 --- a/src/Downloader.Test/UnitTests/ChunkDownloaderTest.cs +++ b/src/Downloader.Test/UnitTests/ChunkDownloaderTest.cs @@ -197,8 +197,7 @@ public async Task OverflowWhenReadStreamTest() { // arrange byte[] randomlyBytes = DummyData.GenerateRandomBytes(Size); - int end = Size / 2 - 1; - Chunk chunk = new(0, end); + Chunk chunk = new(0, (Size / 2) - 1); ChunkDownloader chunkDownloader = new(chunk, Configuration, Storage); using MemoryStream memoryStream = new(randomlyBytes);