Exemplo n.º 1
0
 public void SetUp()
 {
     string[] dmDirs = Util.GetDMDirs();
     string filename = TestConstant.Model_RBC;
     WrappedSimulator sim = new EcellCoreLib.WrappedSimulator(dmDirs);
     _unitUnderTest = new EmlReader(filename, sim);
 }
Exemplo n.º 2
0
 public void TestConstructorEmlReader()
 {
     string[] dmDirs = Util.GetDMDirs();
     string filename = TestConstant.Model_RBC;
     WrappedSimulator sim = new EcellCoreLib.WrappedSimulator(dmDirs);
     EmlReader testEmlReader = new EmlReader(filename, sim);
     Assert.IsNotNull(testEmlReader, "Constructor of type, EmlReader failed to create instance.");
 }
Exemplo n.º 3
0
        public void TestParse()
        {
            EcellObject expectedEcellObject = _unitUnderTest.Parse();
            EcellObject resultEcellObject = null;

            string[] dmDirs = Util.GetDMDirs();
            string filename = TestConstant.Model_RBC;
            WrappedSimulator sim = new EcellCoreLib.WrappedSimulator(dmDirs);
            EmlReader testEmlReader = new EmlReader(filename, sim);

            resultEcellObject = testEmlReader.Parse();
            Assert.AreEqual(expectedEcellObject, resultEcellObject, "Parse method returned unexpected result.");
        }
Exemplo n.º 4
0
        public void TestParseFileNameSim()
        {
            string[] dmDirs = Util.GetDMDirs();
            WrappedSimulator sim = new EcellCoreLib.WrappedSimulator(dmDirs);
            string fileName = TestConstant.Model_RBC;

            EcellObject expectedEcellObject = _unitUnderTest.Parse();
            EcellObject resultEcellObject = null;
            resultEcellObject = EmlReader.Parse(fileName, sim);
            Assert.AreEqual(expectedEcellObject, resultEcellObject, "Parse method returned unexpected result.");

            fileName = TestConstant.Model_Oscillation;
            sim = new EcellCoreLib.WrappedSimulator(dmDirs);
            resultEcellObject = EmlReader.Parse(fileName, sim);
            Assert.IsNotNull(resultEcellObject, "Parse method returned unexpected result.");
        }
Exemplo n.º 5
0
        public void TestWrite()
        {
            string[] dmDirs = Util.GetDMDirs();
            WrappedSimulator sim = new EcellCoreLib.WrappedSimulator(dmDirs);
            EmlReader testEmlReader = new EmlReader(TestConstant.Model_RBC, sim);
            EcellObject model = testEmlReader.Parse();

            List<EcellObject> storedList = model.Children;
            _unitUnderTest.Write(storedList);
        }
Exemplo n.º 6
0
        public void TestCreate()
        {
            _unitUnderTest.Close();
            string[] dmDirs = Util.GetDMDirs();
            WrappedSimulator sim = new EcellCoreLib.WrappedSimulator(dmDirs);
            EmlReader testEmlReader = new EmlReader(TestConstant.Model_Oscillation, sim);
            EcellObject model = testEmlReader.Parse();

            List<EcellObject> storedList = model.Children;
            bool isProjectSave = true;
            EmlWriter.Create(_filename, storedList, isProjectSave);
            EmlWriter.Create(_filename + Constants.FileExtBackUp, storedList, isProjectSave);
        }