Exemplo n.º 1
0
        protected void SetUp()
        {
            CommonTestMethod.DisableDebugAsserts();
            string currentFolder = PathPart.Bin(Environment.CurrentDirectory, "/CssDialog/TestFiles");

            _inputBasePath  = Common.PathCombine(currentFolder, "Input");
            _expectBasePath = Common.PathCombine(currentFolder, "Expected");
        }
Exemplo n.º 2
0
        public void WriteTest()
        {
            FeatureSheet target = new FeatureSheet(); // TODO: Initialize to an appropriate value

            CommonTestMethod.DisableDebugAsserts();
            try
            {
                target.Write();
                Assert.Fail("Write succeeded with no sheet name!");
            }
            catch (Exception e)
            {
                ArgumentNullException expectedException = new ArgumentNullException();
                Assert.AreEqual(expectedException.GetType(), e.GetType());
            }
            finally
            {
                CommonTestMethod.EnableDebugAsserts();
            }
        }
Exemplo n.º 3
0
        public void ReadToEndTest()
        {
            FeatureSheet target = new FeatureSheet(); // TODO: Initialize to an appropriate value

            // TODO: Sheet parameter must be set
            CommonTestMethod.DisableDebugAsserts();
            try
            {
                target.ReadToEnd();
                Assert.Fail("ReadToEnd returned when Sheet not set!");
            }
            catch (Exception e)
            {
                NullReferenceException expectedException = new NullReferenceException();
                Assert.AreEqual(expectedException.GetType(), e.GetType());
            }
            finally
            {
                CommonTestMethod.EnableDebugAsserts();
            }
        }
Exemplo n.º 4
0
        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();
            }
        }
Exemplo n.º 5
0
 protected void TearDown()
 {
     CommonTestMethod.EnableDebugAsserts();
 }