public void StoreAsVariableRandomStringWithPrefix(int len, string prefix, string varName) { this.variableController.Variables.Should().NotContainKey(varName, $"переменная \"{varName}\" уже существует"); len.Check(prefix, string.Empty); var str = prefix + fakerGenerator.String(len - prefix.Length); this.variableController.SetVariable(varName, str.GetType(), str); }
public void GetRandomString_CorrectParams_ReturnRandomString(int expectedLength) { var randomString = generator.String(expectedLength); randomString.Should().HaveLength(expectedLength); }