Exemplo n.º 1
0
        public static AssessmentRun getVersionFromSaveEngine(string ozasmtFile)
        {
            var findings       = ozasmtFile.loadO2Findings();
            var assessmentSave = new O2AssessmentSave_OunceV7();

            assessmentSave.createAssessmentRunObject(findings);
            return(assessmentSave.assessmentRun);
        }
Exemplo n.º 2
0
        public static void test()
        {
            var testFile = @"E:\_Work\IBM\8.6_files\8.6_files\AltoroJ_2.5 _Callbacks.ozasmt";

            var findings       = "cachedFindings".o2Cache(() => testFile.loadO2Findings());
            var assessmentSave = new O2AssessmentSave_OunceV7();

            var savedFile = assessmentSave.save(findings);
        }
		public static void test()
		{
			var testFile = @"E:\_Work\IBM\8.6_files\8.6_files\AltoroJ_2.5 _Callbacks.ozasmt";
	
			var findings = "cachedFindings".o2Cache(()=>testFile.loadO2Findings());
			var assessmentSave = new O2AssessmentSave_OunceV7();
			    
			var savedFile = assessmentSave.save(findings);
		}
    	public void SaveAndLoad_Work()
    	{ 
    		// save findings using new O2AssessmentSave_OunceV7 engine    		
			var savedFile = new O2AssessmentSave_OunceV7().save(Findings_Load);  									
			
			// check that it exists
			Assert.That(TestFile.fileExists(),"Couldn't find O2AssessmentSave_OunceV7 saved file"); 
			
			// check that we can load the saved file with 7x 
			var o2Assessment = new O2AssessmentLoad_OunceV7_0().loadFile(savedFile);				
			Assert.That(o2Assessment.notNull(), "O2AssessmentLoad_OunceV7_0 failed to load");		
			
			// check that we CAN'T load the saved file with 6.1 
			o2Assessment = new O2AssessmentLoad_OunceV6_1().loadFile(savedFile);					
			Assert.That(o2Assessment.isNull(), "O2AssessmentLoad_OunceV6_1 failed to load");		
			
			// check that we CAN'T load the saved file with 6.0 
			o2Assessment = new O2AssessmentLoad_OunceV6().loadFile(savedFile);					
			Assert.That(o2Assessment.isNull(), "O2AssessmentLoad_OunceV6_0 failed to load");		
		}
		//[Test]
		public void SaveAndLoad_FindingsCountIsTheSame()
		{
			var savedFile = new O2AssessmentSave_OunceV7().save(Findings_Load);
			var savedFindings = savedFile.loadO2Findings();
			Assert.That(savedFindings.size() > 0 , "There where no findings loaded"); 
			Assert.That(savedFindings.size() == Findings_Load.size() , "Finding's size doesn't match"); 
		}
		public static AssessmentRun getVersionFromSaveEngine(string ozasmtFile)
		{
			var findings = ozasmtFile.loadO2Findings();
			var assessmentSave = new O2AssessmentSave_OunceV7(); 
			assessmentSave.createAssessmentRunObject(findings);
			return assessmentSave.assessmentRun;
		}