@@ -0,0 +1,3283 @@
+package com.aemreunal.controller;%0A%0A/*%0A ***************************%0A * Copyright (c) 2014      *%0A *                         *%0A * This code belongs to:   *%0A *                         *%0A * @author Ahmet Emre %C3%9Cnal *%0A * S001974                 *%0A *                         *%0A * aemreunal@gmail.com     *%0A * emre.unal@ozu.edu.tr    *%0A *                         *%0A * aemreunal.com           *%0A ***************************%0A */%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport com.aemreunal.domain.beacon.BeaconCreator;%0Aimport com.aemreunal.domain.beacon.BeaconGetter;%0Aimport com.aemreunal.domain.beacon.BeaconInfo;%0Aimport com.aemreunal.domain.beacon.BeaconRemover;%0Aimport com.aemreunal.domain.project.ProjectCreator;%0Aimport com.aemreunal.domain.project.ProjectInfo;%0Aimport com.aemreunal.domain.user.UserCreator;%0Aimport com.aemreunal.domain.user.UserInfo;%0A%0Apublic class T3BeaconTest %7B%0A    private UserInfo testUser;%0A    private ProjectInfo testProject;%0A%0A    @Before%0A    public void createTestUser() %7B%0A        testUser = UserCreator.createRandomUser();%0A        testProject = ProjectCreator.createRandomProject(testUser.username);%0A    %7D%0A%0A    @Test%0A    public void createRandomBeacon() %7B%0A        BeaconCreator.createRandomBeacon(testUser.username, testProject.projectId);%0A        BeaconCreator.createRandomBeacon(testUser.username, testProject.projectId);%0A    %7D%0A%0A    @Test%0A    public void getBeacon() %7B%0A        BeaconInfo createdBeacon1 = BeaconCreator.createRandomBeacon(testUser.username, testProject.projectId);%0A        BeaconInfo createdBeacon2 = BeaconCreator.createRandomBeacon(testUser.username, testProject.projectId);%0A        BeaconInfo requestedBeacon1 = BeaconGetter.getBeacon(testUser.username, testProject.projectId, createdBeacon1.beaconId);%0A        BeaconInfo requestedBeacon2 = BeaconGetter.getBeacon(testUser.username, testProject.projectId, createdBeacon2.beaconId);%0A        Assert.assertEquals(%22The created and requested beacons don't match!%22, createdBeacon1, requestedBeacon1);%0A        Assert.assertEquals(%22The created and requested beacons don't match!%22, createdBeacon2, requestedBeacon2);%0A        Assert.assertNotEquals(%22Beacons that are supposed to be different are the same!%22, createdBeacon1, requestedBeacon2);%0A        Assert.assertNotEquals(%22Beacons that are supposed to be different are the same!%22, createdBeacon2, requestedBeacon1);%0A    %7D%0A%0A    @Test%0A    public void deleteBeacon() %7B%0A        BeaconInfo createdBeacon1 = BeaconCreator.createRandomBeacon(testUser.username, testProject.projectId);%0A        BeaconInfo createdBeacon2 = BeaconCreator.createRandomBeacon(testUser.username, testProject.projectId);%0A        BeaconRemover.removeBeacon(testUser.username, testProject.projectId, createdBeacon1.beaconId);%0A        BeaconGetter.failToGetBeacon(testUser.username, testProject.projectId, createdBeacon1.beaconId);%0A        BeaconGetter.getBeacon(testUser.username, testProject.projectId, createdBeacon2.beaconId);%0A        BeaconRemover.removeBeacon(testUser.username, testProject.projectId, createdBeacon2.beaconId);%0A        BeaconGetter.failToGetBeacon(testUser.username, testProject.projectId, createdBeacon1.beaconId);%0A        BeaconGetter.failToGetBeacon(testUser.username, testProject.projectId, createdBeacon2.beaconId);%0A    %7D%0A%7D%0A

Create simple beacon tests