public void RetroIdentifier_CreateNew_CreatesIdOfLengthLessThanOrEqualTo32() { // Given / when RetroIdentifier retroIdentifier = this._retroIdentifierService.CreateNew(); // Then Assert.That(retroIdentifier.StringId, Has.Length.LessThanOrEqualTo(32), $"Id {retroIdentifier} is not valid"); }
public void RetroIdentifier_CreateNew_CreatesValidId() { // Given RetroIdentifier retroIdentifier = this._retroIdentifierService.CreateNew(); // When bool isValid = this._retroIdentifierService.IsValid(retroIdentifier.StringId); // Then Assert.IsTrue(isValid, $"Id {retroIdentifier} is not valid"); }
public void RetroIdentifier_CreateNew_ReturnsRandomId() { // Given var generatedIds = new HashSet <string>(1000); // When / then for (int count = 1000; count > 0; count--) { RetroIdentifier identifier = this._retroIdentifierService.CreateNew(); Assert.That(generatedIds.Add(identifier.StringId), Is.True, $"Non-unique identifier created: {identifier}"); } }
public Uri GenerateUrlToRetrospectiveLobby(RetroIdentifier urlId) { if (urlId == null) { throw new ArgumentNullException(nameof(urlId)); } var uriBuilder = new UriBuilder(this._siteUrlDetectionService.GetSiteUrl()) { Path = $"/retrospective/{urlId.StringId}/join" }; return(uriBuilder.Uri); }
public CreateRetrospectiveCommandResponse(RetroIdentifier identifier, QrCode qrCode, string location) { this.Identifier = identifier; this.QrCode = qrCode; this.Location = location; }