Files
osu-framework/osu.Framework.Tests/Bindables/BindableStringTest.cs
2019-01-24 17:59:35 +09:00

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);
}
}
}