Ejemplo n.º 1
0
        public void TestAttributeMapToMeasures()
        {
            // Arrange
            var attributes = WebLayerTestHelper.GetAttributes();
            // Act
            var measures = _avmm.MapToMeasures(attributes).ToList();

            // Assert
            measures.Count().ShouldBeEquivalentTo(1);
            measures[0].Name.ShouldBeEquivalentTo("Units");
            measures[0].Type.ShouldBeEquivalentTo(typeof(double).ToInt());
        }
Ejemplo n.º 2
0
        public void TestAttributeMapToDimensionsAndMeasures()
        {
            // Arrange
            var attributes = WebLayerTestHelper.GetAttributes();
            // Act
            var dtos = _avmm.MapToDimensionsAndMeasures(attributes).ToList();

            // Assert
            dtos.Count().ShouldBeEquivalentTo(5);
            dtos[0].Name.ShouldBeEquivalentTo("Product");
            dtos[0].Type.ShouldBeEquivalentTo(typeof(string));
            dtos[1].Name.ShouldBeEquivalentTo("Category");
            dtos[1].Type.ShouldBeEquivalentTo(typeof(string));
            dtos[2].Name.ShouldBeEquivalentTo("Place");
            dtos[2].Type.ShouldBeEquivalentTo(typeof(string));
            dtos[3].Name.ShouldBeEquivalentTo("Region");
            dtos[3].Type.ShouldBeEquivalentTo(typeof(string));
            dtos[4].Name.ShouldBeEquivalentTo("Units");
            dtos[4].Type.ShouldBeEquivalentTo(typeof(double));
        }
Ejemplo n.º 3
0
        public void TestAttributeMapToDimensions()
        {
            // Arrange
            var attributes = WebLayerTestHelper.GetAttributes();
            // Act
            var dimensions = _avmm.MapToDimensions(attributes).ToList();

            // Assert
            dimensions.Count().ShouldBeEquivalentTo(4);
            dimensions[0].Name.ShouldBeEquivalentTo("Product");
            dimensions[0].Type.ShouldBeEquivalentTo(typeof(string).ToInt());
            dimensions[1].Name.ShouldBeEquivalentTo("Category");
            dimensions[1].ParentDimension.ShouldBeEquivalentTo(dimensions[0]);
            dimensions[1].Type.ShouldBeEquivalentTo(typeof(string).ToInt());
            dimensions[2].Name.ShouldBeEquivalentTo("Place");
            dimensions[2].Type.ShouldBeEquivalentTo(typeof(string).ToInt());
            dimensions[3].Name.ShouldBeEquivalentTo("Region");
            dimensions[3].ParentDimension.ShouldBeEquivalentTo(dimensions[2]);
            dimensions[3].Type.ShouldBeEquivalentTo(typeof(string).ToInt());
        }