src/test/kotlin/de/uapcore/lightpit/vcs/HgConnectorTest.kt

Mon, 17 Jul 2023 14:45:42 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 17 Jul 2023 14:45:42 +0200
changeset 279
d73537b925af
child 280
12b898531d1a
permissions
-rw-r--r--

start implementation of HgConnector

universe@279 1 /*
universe@279 2 * Copyright 2023 Mike Becker. All rights reserved.
universe@279 3 *
universe@279 4 * Redistribution and use in source and binary forms, with or without
universe@279 5 * modification, are permitted provided that the following conditions are met:
universe@279 6 *
universe@279 7 * 1. Redistributions of source code must retain the above copyright
universe@279 8 * notice, this list of conditions and the following disclaimer.
universe@279 9 *
universe@279 10 * 2. Redistributions in binary form must reproduce the above copyright
universe@279 11 * notice, this list of conditions and the following disclaimer in the
universe@279 12 * documentation and/or other materials provided with the distribution.
universe@279 13 *
universe@279 14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
universe@279 15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
universe@279 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
universe@279 17 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
universe@279 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
universe@279 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
universe@279 20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
universe@279 21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
universe@279 22 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
universe@279 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
universe@279 24 *
universe@279 25 */
universe@279 26
universe@279 27 package de.uapcore.lightpit.vcs
universe@279 28
universe@279 29 import kotlin.test.Test
universe@279 30 import kotlin.test.assertFalse
universe@279 31 import kotlin.test.assertTrue
universe@279 32
universe@279 33 class HgConnectorTest {
universe@279 34
universe@279 35 private val testee = HgConnector("/usr/bin/hg")
universe@279 36
universe@279 37 @Test
universe@279 38 fun checkAvailability() {
universe@279 39 assertTrue(testee.checkAvailability())
universe@279 40 }
universe@279 41
universe@279 42 @Test
universe@279 43 fun checkAvailabilityFalse() {
universe@279 44 assertFalse(HgConnector("/bin/false").checkAvailability())
universe@279 45 }
universe@279 46 }

mercurial