public void Generate_WhenCalledWithNull_ThrowsArgumentNullException() { var fakedHashService = GetFakedHashService(); var generator = new HashMemberNameGenerator(fakedHashService); Assert.Throws<ArgumentNullException>(() => generator.Generate(null)); }
public void Generate_WhenPassedValueLengthIsLessThanMemberPathSubstringLength_CompleteValuePlusHashIsReturned() { var fakedHashService = GetFakedHashService(); var generator = new HashMemberNameGenerator(fakedHashService); var inputValue = new string('a', generator.MemberPathSubstringLength - 1); var memberName = generator.Generate(inputValue); Assert.AreEqual(inputValue + "_" + FakedHash, memberName); }