Esempio n. 1
0
        public void Empty_byte_array_checksum_should_be_same_as_empty_string_checksum(IChecksumImplementation impl)
        {
            string emptyByteArray = impl.FromBytes(new byte[0]);
            string emptyString    = impl.FromString(string.Empty);

            emptyByteArray.ShouldBe(emptyString);
        }
Esempio n. 2
0
 public void Should_throw_for_null_values(IChecksumImplementation impl)
 {
     Should.Throw <ArgumentNullException>(() => impl.FromBytes(null));
     Should.Throw <ArgumentNullException>(() => impl.FromFile(null));
     Should.Throw <ArgumentNullException>(() => impl.FromFile(null, 4096));
     Should.Throw <ArgumentNullException>(() => impl.FromStream(null));
     Should.Throw <ArgumentNullException>(() => impl.FromString(null));
 }