예제 #1
0
        public void Ctor_ShouldSucceedWhenDirectoryFound()
        {
            // prepare
            var homePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
            // Execute
            var result = new GSettingsSchemaSource($"{homePath}/schemas/", null, true);

            // Asser
            Assert.NotEqual(IntPtr.Zero, result.GSettingsSchemaSourcePtr);
        }
예제 #2
0
        public void ListSchemas_ShouldReturnAllSchemas()
        {
            // prepare
            var schemaSource = new GSettingsSchemaSource();
            // Execute
            var schemas = schemaSource.ListSchemas(false);

            // Assert
            // Non relocatable:
            //  [com.honosoft.integration.with.path.book]
            //  [com.honosoft.integration.with.path]
            // Relocatable:
            //  [Empty]
            Assert.Equal(2, schemas.NonRelocatable.Count);
            Assert.Empty(schemas.Relocatable);
        }