コード例 #1
0
        public void GenerateInt32_ShouldBeSuccessful(int length)
        {
            var randNumber = Uniquify.GetInt32(length);

            randNumber.ToString().Should().HaveLength(length);
            randNumber.Should().BeOfType(typeof(int)).And.NotBe(0);
        }
コード例 #2
0
        public void GenerateInt32_WithOutOfRangeLength_ShouldBeFailed(int length)
        {
            Action waitingForException = () => Uniquify.GetInt32(length);

            waitingForException.Should().Throw <ArgumentOutOfRangeException>();
        }