public IEnumerable <string> AllUnitNamesFor(IDimension dimension) { if (dimension == null) { return(Enumerable.Empty <string>()); } return(dimension.GetUnitNames()); }
public static IEnumerable <string> GetSharedUnitNames(this IDimension first, IDimension second) { if (first == null || second == null) { return(Enumerable.Empty <string>()); } return(first.GetUnitNames().Intersect(second.GetUnitNames())); }
protected override void Context() { base.Context(); _dimension = A.Fake <IDimension>(); A.CallTo(() => _dimension.GetUnitNames()).Returns(new[] { "A", "B" }); }