Affecto.Testing.SpecFlow.Identifiers.Generate C# (CSharp) Method

Generate() public method

public Generate ( string textWithId ) : void
textWithId string
return void
        public void Generate(string textWithId)
        {
            if (string.IsNullOrWhiteSpace(textWithId))
            {
                throw new ArgumentException("Empty text cannot be added.", "textWithId");
            }
            if (IsTextAdded(textWithId))
            {
                throw new ArgumentException(string.Format("Text '{0}' already added.", textWithId), "textWithId");
            }
            identifiedTexts.Add(Guid.NewGuid(), textWithId);
        }