public void CannotComputeTwice() { using var generator = new UniqueIDGenerator(); generator.Compute(); var ex = Record.Exception(() => generator.Compute()); Assert.IsType <ObjectDisposedException>(ex); Assert.StartsWith("Cannot use UniqueIDGenerator after you have called Compute or Dispose", ex.Message); }
public void NoData() { using var generator = new UniqueIDGenerator(); var result = generator.Compute(); Assert.Equal("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", result); }
public void SingleString() { using var generator = new UniqueIDGenerator(); generator.Add("Hello, world!"); var result = generator.Compute(); Assert.Equal("5450bb49d375ba935c1fe9c4dc48775d7d343fb97f22f07f8950f34a75a2708f", result); }