mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
33 lines
891 B
C#
33 lines
891 B
C#
// 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 NUnit.Framework;
|
|
using osu.Framework.Configuration;
|
|
|
|
namespace osu.Framework.Tests.Bindables
|
|
{
|
|
[TestFixture]
|
|
public class BindableStringTest
|
|
{
|
|
[TestCase("")]
|
|
[TestCase(null)]
|
|
[TestCase("this is a string")]
|
|
public void TestSet(string value)
|
|
{
|
|
var bindable = new Bindable<string> { Value = value };
|
|
Assert.AreEqual(value, bindable.Value);
|
|
}
|
|
|
|
[TestCase("")]
|
|
[TestCase("null")]
|
|
[TestCase("this is a string")]
|
|
public void TestParsingString(string value)
|
|
{
|
|
var bindable = new Bindable<string>();
|
|
bindable.Parse(value);
|
|
|
|
Assert.AreEqual(value, bindable.Value);
|
|
}
|
|
}
|
|
}
|