Exemplo n.º 1
0
        public void String_returns_string_with_the_desired_prefix_suffix_length(string prefix, int length)
        {
            var anonymousString = AnonymousData.String(prefix, length);

            Assert.IsTrue(anonymousString.StartsWith($"{prefix}_"));
            Assert.AreEqual(length, anonymousString.Length - $"{prefix}_".Length);
        }
Exemplo n.º 2
0
 public void String_returns_string_with_no_prefix_and_desired_suffix_length(int length)
 {
     Assert.AreEqual(length, AnonymousData.String("", length).Length);
 }
Exemplo n.º 3
0
 public void String_throws_exception_if_length_is_less_than_one(int length)
 {
     Assert.ThrowsException <ArgumentOutOfRangeException>(() => AnonymousData.String("", length), "length must be greater than zero");
 }
Exemplo n.º 4
0
 public void String_returns_string_with_no_prefix_when_null_empty_or_space_and_correct_suffix_length(string prefix, int lenght)
 {
     Assert.AreEqual(lenght, AnonymousData.String(prefix, lenght).Length);
 }