예제 #1
0
        public void TextIdGenerator_GetTwoIds_ReturnsDifferentStrings()
        {
            var sut = new TextIdGenerator();

            var id1 = sut.GetNextId();
            var id2 = sut.GetNextId();

            Debug.WriteLine(id1);
            Debug.WriteLine(id2);

            Assert.AreNotEqual(id1, id2);
        }
예제 #2
0
        public void TextIdGenerator_WithZeroSeed_Returns0000000000001()
        {
            var sut = new TextIdGenerator(0);

            var id = sut.GetNextId();

            Assert.AreEqual("0000000000001", id);
        }
예제 #3
0
        public void TextIdGenerator_GetNextId_ReturnsValidString()
        {
            var sut = new TextIdGenerator();

            var id = sut.GetNextId();

            Debug.WriteLine(id);

            Assert.AreEqual(13, id.Length);
            Assert.IsFalse(string.IsNullOrWhiteSpace(id));
        }