Esempio n. 1
0
        public void DatabaseFileInfoShouldReturnNullGivenEmptyProperties()
        {
            LocalizedPropertyInfo[] properties = new LocalizedPropertyInfo[] { };
            var fileInfo = new DatabaseFileInfo(properties);

            Assert.True(string.IsNullOrEmpty(fileInfo.Id));
            Assert.True(string.IsNullOrEmpty(fileInfo.GetPropertyValueAsString(BackupSetInfo.BackupComponentPropertyName)));
        }
Esempio n. 2
0
        public void DatabaseFileInfoShouldReturnValuesGivenValidProperties()
        {
            LocalizedPropertyInfo[] properties = new LocalizedPropertyInfo[] {
                new LocalizedPropertyInfo
                {
                    PropertyName  = "name",
                    PropertyValue = 1
                },
                new LocalizedPropertyInfo
                {
                    PropertyName  = DatabaseFileInfo.IdPropertyName,
                    PropertyValue = "id"
                }
            };
            var fileInfo = new DatabaseFileInfo(properties);

            Assert.Equal(fileInfo.Id, "id");
            Assert.Equal(fileInfo.GetPropertyValueAsString("name"), "1");
        }