FindByteArray() public method

Finds the array of T:System.Byte values for the specified setting.
public FindByteArray ( string settingName, byte defaultValue ) : byte[]
settingName string The name of the setting.
defaultValue byte The default value of the setting if it is not found.
return byte[]
コード例 #1
0
        public void FindByteArray_WithInvalidSetting_ReturnsDefault()
        {
            var helper   = new RuleSettingsHelper();
            var expected = new byte[] { 1, 2, 3 };

            CollectionAssert.AreEqual(expected, helper.FindByteArray("good", expected));
        }
コード例 #2
0
        public void FindByteArray_WithValidSetting_ReturnsValue()
        {
            var helper       = new RuleSettingsHelper();
            var expected     = new byte[] { 1, 2, 3 };
            var defaultValue = new byte[] { 4, 5, 6 };

            helper.Add("good", expected);
            CollectionAssert.AreEqual(expected, helper.FindByteArray("good", defaultValue));
        }
コード例 #3
0
 public void FindByteArray_WithValidSetting_ReturnsValue()
 {
     var helper = new RuleSettingsHelper();
     var expected = new byte[] { 1, 2, 3 };
     var defaultValue = new byte[] { 4, 5, 6 };
     helper.Add("good", expected);
     CollectionAssert.AreEqual(expected, helper.FindByteArray("good", defaultValue));
 }
コード例 #4
0
 public void FindByteArray_WithInvalidSetting_ReturnsDefault()
 {
     var helper = new RuleSettingsHelper();
     var expected = new byte[] { 1, 2, 3 };
     CollectionAssert.AreEqual(expected, helper.FindByteArray("good", expected));
 }