public void Axes_Subset() { (var cube1, var cube2) = CubePoints(); var combinedCube = CubeUtils.CombineCubes(new [] { cube1, cube2 }, new string [] { "str3" }); Assert.AreEqual(1, combinedCube.AxisSet.Count); Assert.IsTrue(combinedCube.AxisSet.Any(axis => axis.Name == "str3")); Assert.AreEqual(1, combinedCube.Count()); var val = combinedCube.Single(); Assert.AreEqual(11, val.CubeValue.Value); }
public void Axes_Order2() { (var cube1, var cube2) = CubePoints(); var combinedCube = CubeUtils.CombineCubes(new [] { cube1, cube2 }, new string [] { "str3", "str1" }); Assert.AreEqual(2, combinedCube.AxisSet.Count); Assert.IsTrue(combinedCube.AxisSet.Any(axis => axis.Name == "str1")); Assert.IsTrue(combinedCube.AxisSet.Any(axis => axis.Name == "str3")); var axisNames = combinedCube.AxisSet.Select(a => a.Name).ToList(); Assert.AreEqual("str3", axisNames [0]); Assert.AreEqual("str1", axisNames [1]); Assert.AreEqual(1, combinedCube.Count()); var val = combinedCube.Single(); Assert.AreEqual(11, val.CubeValue.Value); }