public void UnLoadValuesTest() { var root = Param.LoadValues(Common.PathCombine(_inputBasePath, _StyleSettings)); Assert.AreNotEqual(null, root, "UnLoadValueTest expected data to load into root"); Param.UnLoadValues(); try { var value = Param.Value[Param.InputType]; Assert.Fail("Values available after UnLoadValues"); } catch (Exception e) { var expected = new KeyNotFoundException(); Assert.AreEqual(expected.GetType(), e.GetType()); } }
public void SaveFeaturesTest() { FeatureSheet target = new FeatureSheet(); // TODO: Initialize to an appropriate value TreeView tv = null; // TODO: Initialize to an appropriate value // TODO: SaveFeatures depends on settings in Param class being loaded! CommonTestMethod.DisableDebugAsserts(); try { target.SaveFeatures(tv); Assert.Fail("SaveFeatures returned when Param not loaded!"); } catch (Exception e) { KeyNotFoundException expectedException = new KeyNotFoundException(); Assert.AreEqual(expectedException.GetType(), e.GetType()); } finally { CommonTestMethod.EnableDebugAsserts(); } }