public void SaveMacroPlanTest(string imagepath) { //assign var shapemodelpath = "filepath"; var note = "note"; var exportUnit = "mm"; var image = new HImage(imagepath); var imageBinData = new Binary(ImageConventer.ConvertHalconImageToByteArray(image, false)); var matchingParam = new MatchingParam(); var matchingParamByteArray = ModelSerializer.DoSerialize(matchingParam); var matchingParamBinData = new Binary(matchingParamByteArray); BindingList <GeoDataGridViewModel> a = new BindingList <GeoDataGridViewModel>(); a.Add(new GeoDataGridViewModel() { RecordID = "aaa" }); var measureBinData = ModelSerializer.DoSerialize(a); //BindingList a; var ma = new MeasureAssistant(); var maParam = ma.GetMeasureAssistantParam(); var maParamBin = ModelSerializer.DoSerialize(maParam); LightChannel upper = new LightChannel() { Channel = "00", Intensity = 100, OnOff = LightSwitch.On }; LightChannel bottom = new LightChannel() { Channel = "01", Intensity = 200, OnOff = LightSwitch.OFF }; //act var success = SDMSRepo.SaveMacroPlan("Test", Guid.NewGuid().ToString(), shapemodelpath, note, imageBinData, exportUnit, matchingParamBinData, measureBinData, maParamBin, upper, bottom, new ShapeViewModel() { }, "system", ""); //assert Assert.True(success); }