#815 Save yaw & pitch for last login in SQL data sources

This commit is contained in:
ljacqu
2017-04-22 13:30:03 +02:00
parent 70298a830b
commit e56a3c0ab6
18 changed files with 188 additions and 93 deletions
@@ -126,7 +126,7 @@ public class EmailRegisterExecutorProviderTest {
// then
assertThat(auth, hasAuthBasicData("veronica", "Veronica", "test@example.com", "123.45.67.89"));
assertThat(auth, hasAuthLocation(48, 96, 144, "someWorld"));
assertThat(auth, hasAuthLocation(48, 96, 144, "someWorld", 0, 0));
assertThat(auth.getPassword().getHash(), stringWithLength(12));
}
@@ -100,7 +100,7 @@ public class PasswordRegisterExecutorTest {
TestHelper.mockPlayerIp(player, "123.45.67.89");
World world = mock(World.class);
given(world.getName()).willReturn("someWorld");
given(player.getLocation()).willReturn(new Location(world, 48, 96, 144));
given(player.getLocation()).willReturn(new Location(world, 48, 96, 144, 1.1f, 0.28f));
PasswordRegisterParams params = PasswordRegisterParams.of(player, "pass", "mail@example.org");
// when
@@ -108,7 +108,7 @@ public class PasswordRegisterExecutorTest {
// then
assertThat(auth, hasAuthBasicData("s1m0n", "S1m0N", "mail@example.org", "123.45.67.89"));
assertThat(auth, hasAuthLocation(48, 96, 144, "someWorld"));
assertThat(auth, hasAuthLocation(48, 96, 144, "someWorld", 1.1f, 0.28f));
assertThat(auth.getPassword(), equalToHash("pass"));
}
@@ -28,7 +28,7 @@ public class PlayerAuthBuilderHelperTest {
TestHelper.mockPlayerIp(player, ip);
World world = mock(World.class);
given(world.getName()).willReturn("worldName");
Location location = new Location(world, 123, 80, -99);
Location location = new Location(world, 123, 80, -99, 2.45f, 7.61f);
given(player.getLocation()).willReturn(location);
HashedPassword hashedPassword = new HashedPassword("myHash0001");
String email = "test@example.org";
@@ -38,7 +38,7 @@ public class PlayerAuthBuilderHelperTest {
// then
assertThat(auth, hasAuthBasicData("noah", "Noah", email, ip));
assertThat(auth, hasAuthLocation(123, 80, -99, "worldName"));
assertThat(auth, hasAuthLocation(123, 80, -99, "worldName", 2.45f, 7.61f));
}
@Test