public void Creates_GUID_strings() { var generator = new TemporaryStringValueGenerator(); var values = new HashSet<Guid>(); for (var i = 0; i < 100; i++) { var generatedValue = generator.Next(); values.Add(Guid.Parse(generatedValue)); } Assert.Equal(100, values.Count); }
public void Creates_GUID_strings() { var generator = new TemporaryStringValueGenerator(); var values = new HashSet <Guid>(); for (var i = 0; i < 100; i++) { var generatedValue = generator.Next(); values.Add(Guid.Parse(generatedValue)); } Assert.Equal(100, values.Count); }
public async Task Creates_GUID_strings_test(bool async) { var generator = new TemporaryStringValueGenerator(); var stateEntry = TestHelpers.CreateStateEntry <WithString>(_model); var property = stateEntry.EntityType.GetProperty("Id"); var values = new HashSet <Guid>(); for (var i = 0; i < 100; i++) { var generatedValue = async ? await generator.NextAsync(property, new DbContextService <DataStoreServices>(() => null)) : generator.Next(property, new DbContextService <DataStoreServices>(() => null)); values.Add(Guid.Parse((string)generatedValue)); } Assert.Equal(100, values.Count); }