Skip to content

Commit

Permalink
small test for edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
imurashka committed Aug 29, 2024
1 parent d02e2e2 commit 6216d9a
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions Tests/BinaryPrefsTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using NUnit.Framework;
using FluentAssertions;
using NUnit.Framework;
using UnityEngine;
using Appegy.Storage;

namespace Appegy.Tests.Storage
namespace Appegy.Storage
{
[TestFixture]
public class BinaryPrefsIntTests
Expand Down Expand Up @@ -267,5 +266,24 @@ public void SetString_ShouldOverrideExistingValueInBinaryStorage()
}

#endregion

#region Edges

[Test]
public void SetInt_GetFloat_ShouldReturnCorrectInt()
{
// Arrange
var key = "key";
var value = 42;

// Act
PlayerPrefs.SetInt(key, value);
PlayerPrefs.SetFloat(key, value);

// Assert
BinaryPrefs.GetFloat(key).Should().Be(value);
}

#endregion
}
}

0 comments on commit 6216d9a

Please sign in to comment.