public LoadConfiguration ( ) : |
||
return |
public void LoadConfiguration_LoadsExpectedEntity() { var tempFile = Path.GetTempFileName(); File.WriteAllText(tempFile, TestData.SampleConfiguration); try { var dal = new ConfigurationDataAccess(tempFile); var entity = dal.LoadConfiguration(); Assert.IsNotNull(entity); Assert.AreEqual(100, entity.DataCompatibilityVersion); StringAssert.AreEqualIgnoringCase("C:\\SomeValue\\", entity.StoragePath); Assert.AreEqual(8000, entity.WebApiPort); } finally { File.Delete(tempFile); } }
public void LoadConfiguration_LoadsExpectedEntity() { var tempFile = Path.GetTempFileName(); File.WriteAllText(tempFile, TestData.SampleConfiguration); try { var dal = new ConfigurationDataAccess(tempFile); var entity = dal.LoadConfiguration(); Assert.IsNotNull(entity); Assert.AreEqual(100, entity.DataCompatibilityVersion); StringAssert.AreEqualIgnoringCase("C:\\SomeValue\\", entity.StoragePath); Assert.AreEqual(8000, entity.WebApiPort); } finally { File.Delete(tempFile); } }