public void ToXmiTest() { List <GeneralUseStructure> generalUseStructure; XmlDocument resultDocument; generalUseStructure = StructureCollectionUtil.GetStructureCollectionActOats(); resultDocument = exporter.ToXmi(generalUseStructure); Assert.IsNotNull(resultDocument, "Method returned null"); }
public void ConverterTest() { List <GeneralUseStructure> listModel, methodReturn; StructureType type; listModel = new List <GeneralUseStructure>(); listModel = StructureCollectionUtil.GetStructureCollectionActOats(); //this parameter is not used type = StructureType.OATS; methodReturn = converter.Converter(listModel, type); Assert.IsNotNull(methodReturn, "Method returned null"); Assert.IsTrue(methodReturn.Count == 1, "Nothing was converted"); }
public void GenerateScriptTest() { DirectoryInfo testDataDirectory, testScriptDirectory, testOutputPath; List <GeneralUseStructure> generalUseStructure; testOutputPath = new DirectoryInfo("Result Files\\"); generalUseStructure = StructureCollectionUtil.GetStructureCollectionActOats(); FileUtil.CleanFolder(testOutputPath); parser.GenerateScript(generalUseStructure, testOutputPath.FullName); testDataDirectory = new DirectoryInfo(testOutputPath.FullName + "\\TestData"); testScriptDirectory = new DirectoryInfo(testOutputPath.FullName + "\\TestScript"); #region Check parsed files Assert.IsTrue(testDataDirectory.GetFiles().Length > 0, "No TestData was created"); Assert.IsTrue(testScriptDirectory.GetFiles().Length > 0, "No TestScript was created"); Assert.IsTrue(testDataDirectory.GetFiles()[0].Length > 0, "TestData size is zero"); Assert.IsTrue(testScriptDirectory.GetFiles()[0].Length > 0, "TestScript size is zero"); #endregion }