/*
 *  Copyright (c) 2017 Otávio Santana and others
 *   All rights reserved. This program and the accompanying materials
 *   are made available under the terms of the Eclipse Public License v1.0
 *   and Apache License v2.0 which accompanies this distribution.
 *   The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 *   and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
 *
 *   You may elect to redistribute this code under either of these licenses.
 *
 *   Contributors:
 *
 *   Otavio Santana
 */

package org.jnosql.diana.orientdb.document;

import org.jnosql.diana.api.document.DocumentCollectionManagerFactory;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertNotNull;

public class OrientDBDocumentConfigurationTest {



    @Test
    public void shouldCreateDocumentCollectionManagerFactory() {
        OrientDBDocumentConfiguration configuration = new OrientDBDocumentConfiguration();
        configuration.setHost("172.17.0.2");
        configuration.setUser("root");
        configuration.setPassword("rootpwd");
        DocumentCollectionManagerFactory managerFactory = configuration.get();
        assertNotNull(managerFactory);
    }

    @Test
    public void shouldCreateByConfigurationFile() {
        OrientDBDocumentConfiguration configuration = new OrientDBDocumentConfiguration();
        DocumentCollectionManagerFactory managerFactory = configuration.get();
        assertNotNull(managerFactory);
    }
}
@@ -788,16 +788,77 @@
 NotNull;
+%0Aimport static org.junit.jupiter.api.Assertions.assertThrows;
 %0A%0Apublic
@@ -901,18 +901,16 @@
 Test %7B%0A%0A
-%0A%0A
     @Tes
@@ -1599,9 +1599,189 @@
 ;%0A    %7D%0A
-%7D
+%0A    @Test%0A    public void shouldThrowExceptionWhenSettingsIsNull() %7B%0A        assertThrows(NullPointerException.class, () -%3E new OrientDBDocumentConfiguration().get(null));%0A    %7D%0A%7D%0A

add test - Should throw exception when settings is null