Пример #1
0
        public void TestCreatesRandomString()
        {
            var service = new UuidService();

            Assert.IsInstanceOf <string>(service.GenerateUuId("prefix"));
            Assert.AreNotEqual(service.GenerateUuId("prefix"), service.GenerateUuId("prefix"));
        }
Пример #2
0
        public void TestCreatesRandomStringWithPrefix()
        {
            var service = new UuidService();

            Assert.IsInstanceOf <string>(service.GenerateUuId("prefix"));
            Assert.True(service.GenerateUuId("prefix").StartsWith("prefix"));
        }
Пример #3
0
        public void GenerateUuidAddsPrefix()
        {
            var service = new UuidService();

            Assert.True(service.GenerateUuId("prefix").StartsWith("prefix_"));
            Assert.True(service.GenerateUuId("session").StartsWith("session_"));
            Assert.True(service.GenerateUuId("test").StartsWith("test_"));
            Assert.True(service.GenerateUuId("new_prefix").StartsWith("new_prefix_"));
        }