public void WriteFileAndGetItsValue() { var _sut = new FileProperties (); _sut.SetValue ("key1", "hoge"); _sut.WriteToFile ("sample_actual.txt"); FileAssert.AreEqual ("../../TestData/sample_expected.txt", "sample_actual.txt"); }
public void SetValueCanDealMultiValue() { var _sut = new FileProperties (); _sut.SetValue ("key0", "value0"); _sut.SetValue ("key1", "value1"); _sut.WriteToFile ("actual_multi_value.txt"); FileAssert.AreEqual("../../TestData/expected_multi_value.txt", "actual_multi_value.txt"); }
public void OriginalFileIOTest() { IFileIO fileo = new FileProperties (); fileo.SetValue ("Year", "2013"); fileo.SetValue ("Month", "05"); fileo.SetValue ("Day", "02"); fileo.WriteToFile ("FileIOExample.txt"); IFileIO filei = new FileProperties (); filei.ReadFromFile("FileIOExample.txt"); Console.WriteLine (filei.GetValue ("Year")); Console.WriteLine (filei.GetValue ("Month")); Console.WriteLine (filei.GetValue ("Day")); }
public void WhenSetValueThenGetValueReturnsValue(string key,string value) { var _sut = new FileProperties (); _sut.SetValue (key, value); Assert.That (_sut.GetValue (key), Is.EqualTo (value)); }
public void ReadFromFileTests(string fileName, string key, string expected) { var _sut = new FileProperties (); _sut.ReadFromFile (fileName); Assert.That (_sut.GetValue (key), Is.EqualTo (expected)); }
public void GetValueReturnsAddedKeyValue(string key, string expected) { var _sut = new FileProperties (); Assert.That (_sut.GetValue(key), Is.EqualTo (expected)); }