Update some more incorrect types for primary key access/set

This commit is contained in:
Dean Herbert
2021-12-13 17:09:13 +09:00
parent 2a4bee61dd
commit aac2aa341c
4 changed files with 17 additions and 14 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using NUnit.Framework;
using osu.Game.Scoring;
@ -29,8 +30,8 @@ namespace osu.Game.Tests.Scores.IO
[Test]
public void TestNonMatchingByPrimaryKey()
{
ScoreInfo score1 = new ScoreInfo { ID = 1 };
ScoreInfo score2 = new ScoreInfo { ID = 2 };
ScoreInfo score1 = new ScoreInfo { ID = Guid.NewGuid() };
ScoreInfo score2 = new ScoreInfo { ID = Guid.NewGuid() };
Assert.That(score1, Is.Not.EqualTo(score2));
}
@ -38,8 +39,10 @@ namespace osu.Game.Tests.Scores.IO
[Test]
public void TestMatchingByPrimaryKey()
{
ScoreInfo score1 = new ScoreInfo { ID = 1 };
ScoreInfo score2 = new ScoreInfo { ID = 1 };
Guid id = Guid.NewGuid();
ScoreInfo score1 = new ScoreInfo { ID = id };
ScoreInfo score2 = new ScoreInfo { ID = id };
Assert.That(score1, Is.EqualTo(score2));
}