public void RandomName_ReturnsDifferentStringEachCall() { var random = new Random(1); var provider = new RandomisedWordProvider(random); var result = provider.CreateRandomName(); var result2 = provider.CreateRandomName(); Assert.AreNotEqual(result, result2); }
public void RandomName_ReturnedValueHasTwoUpperCaseCharsInIt() { var random = new Random(1); var provider = new RandomisedWordProvider(random); var result = provider.CreateRandomName(); Assert.AreEqual(2, result.Count(r => char.IsUpper(r))); }
public void RandomName_ReturnedValueHasASpaceInIt() { var random = new Random(1); var provider = new RandomisedWordProvider(random); var result = provider.CreateRandomName(); Assert.IsTrue(result.Contains(" ")); }
public void RandomName_ReturnsAString() { var random = new Random(1); var provider = new RandomisedWordProvider(random); var result = provider.CreateRandomName(); Assert.AreEqual("Everlasting Charlotte", result); }