示例#1
0
            public async Task Stream_Length_Less_That_64_Kb_Will_Return_64_Kb_In_Bytes()
            {
                //Arrange
                const long length     = 12 * 1024;
                var        calculator = new BlobSizeCalculator();

                //Act
                var result = await calculator.GetBlockSize(length);

                //Assert
                Assert.AreEqual(Kb64, result);
            }
示例#2
0
            public async Task Stream_Length_Between_512_Kb_And_1_Mb_Will_Return_1_Mb_In_Bytes()
            {
                //Arrange
                const long length     = 666 * 1024;
                var        calculator = new BlobSizeCalculator();

                //Act
                var result = await calculator.GetBlockSize(length);

                //Assert
                Assert.AreEqual(Mb1, result);
            }
示例#3
0
            public async Task Stream_Length_Greater_Than_2_Mb_Will_Return_4_Mb_In_Bytes()
            {
                //Arrange
                const long length     = 2345 * 1024;
                var        calculator = new BlobSizeCalculator();

                //Act
                var result = await calculator.GetBlockSize(length);

                //Assert
                Assert.AreEqual(Mb4, result);
            }