Exemplo n.º 1
0
        public void Unit_display_mode_group_digits_test(int bytes, string expectedFriendlyName)
        {
            var options = new FriendlyNameOptions {
                GroupDigits = true
            };
            string friendlyName = ByteSizeFriendlyName.Build(bytes, options);

            friendlyName.ShouldBe(expectedFriendlyName);
        }
        public void Unit_display_mode_hide_only_for_bytes_test(int bytes, string expectedFriendlyName)
        {
            var options = new FriendlyNameOptions {
                UnitDisplayMode = UnitDisplayMode.HideOnlyForBytes
            };
            string friendlyName = ByteSizeFriendlyName.Build(bytes, options);

            Assert.Equal(expectedFriendlyName, friendlyName);
        }
Exemplo n.º 3
0
        public void Unit_display_mode_group_digits_test(int bytes, string expectedFriendlyName)
        {
            var options = new FriendlyNameOptions
            {
                GroupDigits = true
            };
            var friendlyName = ByteSizeFriendlyName.Build(bytes, options);

            Assert.Equal(expectedFriendlyName, friendlyName);
        }