예제 #1
0
        public IEnumerable <string> AllUnitNamesFor(IDimension dimension)
        {
            if (dimension == null)
            {
                return(Enumerable.Empty <string>());
            }

            return(dimension.GetUnitNames());
        }
예제 #2
0
        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()));
        }
예제 #3
0
 protected override void Context()
 {
     base.Context();
     _dimension = A.Fake <IDimension>();
     A.CallTo(() => _dimension.GetUnitNames()).Returns(new[] { "A", "B" });
 }