public void GenerateInt64_ShouldBeSuccessful(int length) { var randNumber = Uniquify.GetInt64(length); randNumber.ToString().Should().HaveLength(length); randNumber.Should().BeOfType(typeof(long)).And.NotBe(0); }
public void GenerateString_WithSingleChar_ShouldBeSuccessful() { var uniqueString = Uniquify.GetString("q", 12); uniqueString.Should().NotBeEmpty().And.HaveLength(12).And.Be("qqqqqqqqqqqq"); }
public void GenerateCustomAlphabetString_ShouldBeSuccessful(int length, string chars) { var uniqueString = Uniquify.GetString(chars, length); uniqueString.Should().NotBeEmpty().And.HaveLength(length).And.ContainAny(chars.Select(c => c.ToString()).ToArray()); }
public void GenerateString_ShouldBeSuccessful(int length) { var uniqueString = Uniquify.GetString(length); uniqueString.Should().NotBeEmpty().And.HaveLength(length); }
public void GenerateInt64_WithOutOfRangeLength_ShouldBeFailed(int length) { Action waitingForException = () => Uniquify.GetInt64(length); waitingForException.Should().Throw <ArgumentOutOfRangeException>(); }