public void ReturnAListWhereTheFirstValueHasTheCorrectPattern() { string expectedValueType1 = string.Empty.GetRandom(); string expectedValue1 = string.Empty.GetRandom(); string expectedPattern1 = string.Empty.GetRandom(); string expectedValueType2 = string.Empty.GetRandom(); string expectedValue2 = string.Empty.GetRandom(); string expectedPattern2 = string.Empty.GetRandom(); string expectedValueType3 = string.Empty.GetRandom(); string expectedValue3 = string.Empty.GetRandom(); string expectedPattern3 = string.Empty.GetRandom(); var target = new IntentEntityValuesBuilder() .Add(expectedValueType1, expectedValue1, expectedPattern1) .Add(expectedValueType2, expectedValue2, expectedPattern2) .Add(expectedValueType3, expectedValue3, expectedPattern3) .Build(); var actualValue = target.SingleOrDefault(v => v.Value == expectedValue1); Assert.Equal(expectedPattern1, actualValue.Pattern); }
public void ReturnAListWithOneInstanceOfTheFirstValue() { string expectedValueType1 = string.Empty.GetRandom(); string expectedValue1 = string.Empty.GetRandom(); string expectedPattern1 = string.Empty.GetRandom(); string expectedValueType2 = string.Empty.GetRandom(); string expectedValue2 = string.Empty.GetRandom(); string expectedPattern2 = string.Empty.GetRandom(); string expectedValueType3 = string.Empty.GetRandom(); string expectedValue3 = string.Empty.GetRandom(); string expectedPattern3 = string.Empty.GetRandom(); var target = new IntentEntityValuesBuilder() .Add(expectedValueType1, expectedValue1, expectedPattern1) .Add(expectedValueType2, expectedValue2, expectedPattern2) .Add(expectedValueType3, expectedValue3, expectedPattern3) .Build(); var actualValue = target.SingleOrDefault(v => v.Value == expectedValue1); Assert.NotNull(actualValue); }