Esempio n. 1
0
 public void CsdlVersion_was_added_if_EntityFramework_version_was_added()
 {
     // +1 to account for CSDL version 1.1
     Assert.Equal(
         EntityFrameworkVersion.GetAllVersions().Count() + 1,
         CsdlVersion.GetAllVersions().Count());
 }
Esempio n. 2
0
        public void GetAllVersions_returns_all_declared_versions()
        {
            var declaredVersions =
                typeof(CsdlVersion)
                .GetFields()
                .Where(f => f.FieldType == typeof(Version))
                .Select(f => f.GetValue(null))
                .OrderByDescending(v => v);

            Assert.True(
                declaredVersions.SequenceEqual(CsdlVersion.GetAllVersions().OrderByDescending(v => v)));
        }