public void TestCreatesRandomString() { var service = new UuidService(); Assert.IsInstanceOf <string>(service.GenerateUuId("prefix")); Assert.AreNotEqual(service.GenerateUuId("prefix"), service.GenerateUuId("prefix")); }
public void TestCreatesRandomStringWithPrefix() { var service = new UuidService(); Assert.IsInstanceOf <string>(service.GenerateUuId("prefix")); Assert.True(service.GenerateUuId("prefix").StartsWith("prefix")); }
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_")); }