Skip to content
This repository was archived by the owner on Oct 18, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# DOcker repo reference:
https://github.com/nastis/Mydocker


# Practice of automation school 2016

See all info in repo [autoschool/autoschool.github.io](https://github.com/autoschool/autoschool.github.io)
31 changes: 31 additions & 0 deletions common-module/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>school-2016</artifactId>
<groupId>ru.qatools.school</groupId>
<version>1.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>

<artifactId>common-module</artifactId>
<name>Common Module</name>

<dependencies>
<dependency>
<groupId>ru.qatools.school</groupId>
<artifactId>steps-module</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>


</project>
9 changes: 9 additions & 0 deletions common-module/src/main/java/ru/qatools/school/data/Place.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main.java.ru.qatools.school.data;

/**
* @author lanwen (Merkushev Kirill)
*/
public enum Place {
HOME,
AT_YANDEX
}
23 changes: 23 additions & 0 deletions common-module/src/main/java/ru/qatools/school/steps/UserSteps.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package main.java.ru.qatools.school.steps;

import main.java.ru.qatools.school.data.Place;

/**
* @author lanwen (Merkushev Kirill)
*/
public class UserSteps {

private Place place;

private UserSteps() {
}

public static UserSteps user() {
return new UserSteps();
}

public UserSteps goTo(Place place) {
this.place = place;
return this;
}
}
31 changes: 31 additions & 0 deletions common-module/src/test/java/ru/qatools/school/MyFirstTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package ru.qatools.school;

import org.junit.Assert;
import org.junit.Test;
import ru.qatools.school.data.Place;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static ru.qatools.school.steps.UserSteps.user;

/**
* @author lanwen (Merkushev Kirill)
*/
public class MyFirstTest {

@Test
public void shouldSeeNull() {
Assert.assertThat(user().goTo(null).getPlace(), is(equalTo(null)));
}

@Test
public void shouldSeeHome() {
Assert.assertThat(user().goTo(Place.HOME).getPlace(), is(equalTo(Place.HOME)));
}

@Test
public void shouldSeeYandex() {
Assert.assertThat(user().goTo(Place.AT_YANDEX).getPlace(), is(equalTo(Place.AT_YANDEX)));
}

}
2 changes: 2 additions & 0 deletions meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/autoschool/autoschool.github.io/blob/master/shtya16/02-gimme-your-first-autotest.md
https://github.com/nastis/practice2016
20 changes: 14 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@
<artifactId>school-2016</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>

<modules>
<module>steps-module</module>
<module>common-module</module>
</modules>

<name>Automation Foreva</name>
<description>First automation project ever</description>

<dependencies>
<!--Common deps here-->
</dependencies>


<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

</project>
10 changes: 8 additions & 2 deletions steps-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@
<groupId>ru.qatools.school</groupId>
<version>1.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>

<artifactId>steps-module</artifactId>
<name>Logic Module</name>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ public UserSteps goTo(Place place) {
this.place = place;
return this;
}

public Place getPlace() {
return place;
}
}
14 changes: 0 additions & 14 deletions steps-module/src/test/java/ru/qatools/school/MyFirstTest.java

This file was deleted.