private static string GetMappingClosureHash(string ssdl, string csdl, string msl, bool sortSequence)
        {
            var mappingCollection =
                StorageMappingItemCollectionTests.CreateStorageMappingItemCollection(ssdl, csdl, msl);

            return(MetadataMappingHasherVisitor.GetMappingClosureHash(
                       3.0, mappingCollection.GetItems <EntityContainerMapping>().Single(), sortSequence));
        }
示例#2
0
        public static void Generate_creates_expected_result()
        {
            var mappingCollection =
                StorageMappingItemCollectionTests.CreateStorageMappingItemCollection(
                    StorageMappingItemCollectionTests.Ssdl,
                    StorageMappingItemCollectionTests.Csdl,
                    StorageMappingItemCollectionTests.Msl);

            var errors     = new List <EdmSchemaError>();
            var viewGroups = mappingCollection.Generate(errors);

            Assert.Equal(1, viewGroups.Count);

            var group = viewGroups[0];

            Assert.Equal("AdventureWorksModelStoreContainer", group.StoreContainerName);
            Assert.Equal("AdventureWorksEntities3", group.ModelContainerName);
            Assert.Equal("e6447993a1b3926723f95dce0a1caccc96ec5774b5ee78bbd28748745ad30db2", group.MappingHash);
            Assert.Equal(2, group.Views.Count);
        }