public void ToStringOnEnumerableSegment_WhereEnumerablesArentConsidered_Expected_ScalarFormat() { PocoPath path = new PocoPath(); IPathSegment segment = path.CreatePathSegment("Collection()"); const string expected = "Collection"; string actual = segment.ToString(false); Assert.AreEqual(expected, actual); }
public void CreateEnumerablePathSegmentFromSegmentText_Expected_EnumerablePocoPathSegment() { PocoPath path = new PocoPath(); IPathSegment segment = path.CreatePathSegment("EnumerableData()"); bool expected = true; bool actual = segment.IsEnumarable; Assert.AreEqual(expected, actual); }
public void CreateScalarPathSegmentFromSegmentText_Expected_ScalarPocoPathSegment() { PocoPath path = new PocoPath(); IPathSegment segment = path.CreatePathSegment("Name"); bool expected = false; bool actual = segment.IsEnumarable; Assert.AreEqual(expected, actual); }
public void ToStringOnScalarSegmentt_WhereEnumerablesAreConsidered__Expected_ScalarFormat() { PocoPath path = new PocoPath(); IPathSegment segment = path.CreatePathSegment("Name"); const string expected = "Name"; string actual = segment.ToString(true); Assert.AreEqual(expected, actual); }
public void ToStringOnEnumerableSegment_Expected_EnumerableFormat() { PocoPath path = new PocoPath(); IPathSegment segment = path.CreatePathSegment("Collection()"); const string expected = "Collection()"; string actual = segment.ToString(); Assert.AreEqual(expected, actual); }
public void ToStringOnScalarSegment_Expected_ScalarFormat() { PocoPath path = new PocoPath(); IPathSegment segment = path.CreatePathSegment("Name"); string expected = "Name"; string actual = segment.ToString(); Assert.AreEqual(expected, actual); }
public void ToStringOnScalarSegment_WhereEnumerablesArentConsidered__Expected_ScalarFormat() { var path = new PocoPath(); var segment = path.CreatePathSegment("Name"); const string expected = "Name"; var actual = segment.ToString(false); Assert.AreEqual(expected, actual); }
public void ToStringOnEnumerableSegment_WhereEnumerablesAreConsidered_Expected_ScalarFormat() { var path = new PocoPath(); var segment = path.CreatePathSegment("Collection()"); const string expected = "Collection()"; var actual = segment.ToString(true); Assert.AreEqual(expected, actual); }
public void CreateScalarPathSegmentFromPropertyInfo_Expected_ScalarPocoPathSegment() { PropertyInfo propertyInfo = typeof(PocoTestData).GetProperty("Name"); PocoPath path = new PocoPath(); IPathSegment segment = path.CreatePathSegment(propertyInfo); bool expected = false; bool actual = segment.IsEnumarable; Assert.AreEqual(expected, actual); }
public void CreateScalarPathSegmentFromPropertyInfo_Expected_ScalarPocoPathSegment() { var propertyInfo = typeof(PocoTestData).GetProperty("Name"); var path = new PocoPath(); var segment = path.CreatePathSegment(propertyInfo.Name, propertyInfo.PropertyType.IsEnumerable()); const bool expected = false; var actual = segment.IsEnumarable; Assert.AreEqual(expected, actual); }
public void CreateEnumerablePathSegmentFromPropertyInfo_Expected_EnumerablePocoPathSegment() { PropertyInfo propertyInfo = typeof(PocoTestData).GetProperty("EnumerableData"); PocoPath path = new PocoPath(); IPathSegment segment = path.CreatePathSegment(propertyInfo.Name, propertyInfo.PropertyType.IsEnumerable()); const bool expected = true; bool actual = segment.IsEnumarable; Assert.AreEqual(expected, actual); }