package com.targetprocess.entities.assigned;

import com.intellij.tasks.integration.live.LiveIntegrationTestCase;

public class TargetprocessIntegrationTest extends LiveIntegrationTestCase<TargetprocessRepository> {
    @Override
    protected TargetprocessRepository createRepository() throws Exception {
        try {
            TargetprocessRepository repository = new TargetprocessRepository(new TargetprocessRepositoryType());
            repository.setUsername("admin");
            repository.setPassword("admin");
            return repository;
        } catch (Exception e) {
            tearDown();
            throw e;
        }
    }

    public void testTestConnection() throws Exception {
        assertNull(myRepository.createCancellableConnection().call());

        myRepository.setPassword("illegal password");
        final Exception error = myRepository.createCancellableConnection().call();
        assertNotNull(error);
        assertTrue(error.getMessage().contains("Unauthorized"));
    }

}

@@ -39,16 +39,19 @@
 igned;%0A%0A
+// 
 import c
@@ -153,16 +153,18 @@
 ionTest 
+/*
 extends 
@@ -211,18 +211,27 @@
 ository%3E
- %7B
+*/ %7B%0A    /*
 %0A    @Ov
@@ -1021,11 +1021,17 @@
 ;%0A    %7D%0A
+    */
 %0A%7D%0A

Disable tests