Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 46cfcc4c authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

make everything compile again

parent ad1c963c
No related branches found
No related tags found
No related merge requests found
Showing
with 726 additions and 17837 deletions
......@@ -29,7 +29,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeclarationCycleZip", "Decl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LicenceHeader", "LicenceHeader\LicenceHeader.csproj", "{E8B0B447-1A54-4BEC-A160-AF0017000781}"
EndProject
Global
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
......@@ -57,6 +57,14 @@ Global
{165DA769-0FC8-44A7-87D6-58D037E765AB}.Release|Any CPU.Build.0 = Release|Any CPU
{165DA769-0FC8-44A7-87D6-58D037E765AB}.Release|x64.ActiveCfg = Release|Any CPU
{165DA769-0FC8-44A7-87D6-58D037E765AB}.Release|x86.ActiveCfg = Release|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Debug|x64.ActiveCfg = Debug|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Debug|x86.ActiveCfg = Debug|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Release|Any CPU.Build.0 = Release|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Release|x64.ActiveCfg = Release|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Release|x86.ActiveCfg = Release|Any CPU
{CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Debug|x64.ActiveCfg = Debug|Any CPU
......@@ -65,26 +73,16 @@ Global
{CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Release|Any CPU.Build.0 = Release|Any CPU
{CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Release|x64.ActiveCfg = Release|Any CPU
{CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Release|x86.ActiveCfg = Release|Any CPU
{6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Debug|x86.ActiveCfg = Debug|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Release|Any CPU.Build.0 = Release|Any CPU
{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Release|x86.ActiveCfg = Release|Any CPU
{6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Debug|x64.ActiveCfg = Debug|Any CPU
{6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Debug|x86.ActiveCfg = Debug|Any CPU
{6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Release|Any CPU.Build.0 = Release|Any CPU
{6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Release|x64.ActiveCfg = Release|Any CPU
{6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Release|x86.ActiveCfg = Release|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Debug|x86.ActiveCfg = Debug|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Release|Any CPU.Build.0 = Release|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Release|x86.ActiveCfg = Release|Any CPU
{6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Debug|x64.ActiveCfg = Debug|Any CPU
{6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Debug|x86.ActiveCfg = Debug|Any CPU
{6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
......@@ -97,6 +95,14 @@ Global
{E23B3A9B-62E7-4476-849E-EEF1C3804A2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E23B3A9B-62E7-4476-849E-EEF1C3804A2F}.Release|x64.ActiveCfg = Release|Any CPU
{E23B3A9B-62E7-4476-849E-EEF1C3804A2F}.Release|x86.ActiveCfg = Release|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Debug|x64.ActiveCfg = Debug|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Debug|x86.ActiveCfg = Debug|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Release|Any CPU.Build.0 = Release|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Release|x64.ActiveCfg = Release|Any CPU
{B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Release|x86.ActiveCfg = Release|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.Debug|x64.ActiveCfg = Debug|Any CPU
......
......@@ -29,27 +29,27 @@ Public Class F_VECTO
Private EStechs As New List(Of String)
'AA-TB
'Populate Advanced Auxiliaries
Private Sub PopulateAdvancedAuxiliaries()
Public n_idle As Single
Public FLDfile As String
'AA-TB
'Populate Advanced Auxiliaries
Private Sub PopulateAdvancedAuxiliaries()
'Scan the program directory for DLL's which are AdvancedAuxiliaries and display
Dim AList As List(Of cAdvancedAuxiliary) = mAAUX_Global.DiscoverAdvancedAuxiliaries()
cboAdvancedAuxiliaries.DataSource = AList
cboAdvancedAuxiliaries.DisplayMember = "AuxiliaryName"
'Scan the program directory for DLL's which are AdvancedAuxiliaries and display
Dim AList As List(Of cAdvancedAuxiliary) = mAAUX_Global.DiscoverAdvancedAuxiliaries()
End Sub
cboAdvancedAuxiliaries.DataSource = AList
cboAdvancedAuxiliaries.DisplayMember = "AuxiliaryName"
End Sub
'Initialise form
Private Sub F02_GEN_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim x As Int16
n_idle = - 1
n_idle = -1
FLDfile = ""
AuxDlog = New F_VEH_AuxDlog
......@@ -60,7 +60,7 @@ Public Class F_VECTO
Me.TabControl1.TabPages(x).Show()
Next
Me.LvAux.Columns(2).Width = - 2
Me.LvAux.Columns(2).Width = -2
'Declaration Mode
If Cfg.DeclMode Then
......@@ -80,12 +80,10 @@ Public Class F_VECTO
Me.PnEcoRoll.Enabled = Not Cfg.DeclMode
Changed = False
'AA-TB
PopulateAdvancedAuxiliaries()
'Attempt to select that found in Config
'AA-TB
PopulateAdvancedAuxiliaries()
'Attempt to select that found in Config
End Sub
'Close - Check for unsaved changes
......@@ -393,7 +391,7 @@ Public Class F_VECTO
Me.Close()
F_MAINForm.RbDecl.Checked = Not F_MAINForm.RbDecl.Checked
F_MAINForm.OpenVectoFile(file)
Case - 1
Case -1
Exit Sub
Case Else '0
'Continue...
......@@ -418,24 +416,23 @@ Public Class F_VECTO
Me.TbDesMaxFile.Text = VEC0.DesMaxFile(True)
'AA-TB
'Try and Select any previously selected Auxiliary Type
For Each item As cAdvancedAuxiliary In cboAdvancedAuxiliaries.Items
'AA-TB
'Try and Select any previously selected Auxiliary Type
For Each item As cAdvancedAuxiliary In cboAdvancedAuxiliaries.Items
Dim aai As cAdvancedAuxiliary = DirectCast(item, cAdvancedAuxiliary)
Dim aai As cAdvancedAuxiliary = DirectCast(item, cAdvancedAuxiliary)
If aai.AssemblyName = VEC0.AuxiliaryAssembly AndAlso VEC0.AuxiliaryVersion = aai.AuxiliaryVersion Then
If aai.AssemblyName = VEC0.AuxiliaryAssembly AndAlso VEC0.AuxiliaryVersion = aai.AuxiliaryVersion Then
cboAdvancedAuxiliaries.SelectedItem = item
Exit For
cboAdvancedAuxiliaries.SelectedItem = item
Exit For
End If
Next
'AA-TB
'Assign any previously saved Axiliary FilePath
txtAdvancedAuxiliaryFile.Text = VEC0.AdvancedAuxiliaryFilePath
End If
Next
'AA-TB
'Assign any previously saved Axiliary FilePath
txtAdvancedAuxiliaryFile.Text = VEC0.AdvancedAuxiliaryFilePath
Me.LvAux.Items.Clear()
......@@ -508,32 +505,32 @@ Public Class F_VECTO
Dim AuxEntry As cVECTO.cAuxEntry
Dim LV0 As ListViewItem
Dim sb As cSubPath
Dim absoluteAAUxFile As String = String.Empty
Dim aaAssemblyName As String = String.Empty
Dim aaAssemblyVersion As String = String.Empty
Dim message As String = String.Empty
Dim absoluteAAUxFile As String = String.Empty
Dim aaAssemblyName As String = String.Empty
Dim aaAssemblyVersion As String = String.Empty
Dim message As String = String.Empty
'AA-TB
'Validation of Auxiliary Types/Advanced Auxiliaries
'if not classic, check the file is valid, if not fail the operation and alert user.
If cboAdvancedAuxiliaries.SelectedIndex > 0 Then
'resolve absolute path for auxiliary file.
absoluteAAUxFile = mAAUX_Global.ResolveAAUXFilePath(fPATH(VECTOfile), txtAdvancedAuxiliaryFile.Text)
'AA-TB
'Validation of Auxiliary Types/Advanced Auxiliaries
'if not classic, check the file is valid, if not fail the operation and alert user.
If cboAdvancedAuxiliaries.SelectedIndex > 0 Then
aaAssemblyName = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AssemblyName
aaAssemblyVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AuxiliaryVersion
'resolve absolute path for auxiliary file.
absoluteAAUxFile = mAAUX_Global.ResolveAAUXFilePath(fPATH(VECTOfile), txtAdvancedAuxiliaryFile.Text)
aaAssemblyName = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AssemblyName
aaAssemblyVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AuxiliaryVersion
If Not mAAUX_Global.ValidateAAUXFile(absoluteAAUxFile, aaAssemblyName, aaAssemblyVersion, message) Then
MessageBox.Show(String.Format("You have selected an advanced auxiliary *Auxiliary Type*, but the file specified is invalid :{0}", message))
Return False
End If
End If
If Not mAAUX_Global.ValidateAAUXFile(absoluteAAUxFile, aaAssemblyName, aaAssemblyVersion, message) Then
MessageBox.Show(
String.Format("You have selected an advanced auxiliary *Auxiliary Type*, but the file specified is invalid :{0}",
message))
Return False
End If
End If
VEC0 = New cVECTO
......@@ -562,10 +559,10 @@ Public Class F_VECTO
'a_DesMax
VEC0.DesMaxFile = Me.TbDesMaxFile.Text
'AA-TB
VEC0.AuxiliaryAssembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AssemblyName
VEC0.AuxiliaryVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AuxiliaryVersion
VEC0.AdvancedAuxiliaryFilePath = txtAdvancedAuxiliaryFile.Text
'AA-TB
VEC0.AuxiliaryAssembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AssemblyName
VEC0.AuxiliaryVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AuxiliaryVersion
VEC0.AdvancedAuxiliaryFilePath = txtAdvancedAuxiliaryFile.Text
For Each LV0 In LvAux.Items
......@@ -624,7 +621,7 @@ Public Class F_VECTO
If ChangeCheckCancel() Then Exit Sub
n_idle = - 1
n_idle = -1
FLDfile = ""
'Files
......@@ -765,11 +762,11 @@ Public Class F_VECTO
AuxDlog.VehPath = fPATH(VECTOfile)
AuxDlog.TbPath.Text = ""
AuxDlog.CbType.SelectedIndex = - 1
AuxDlog.CbType.SelectedIndex = -1
AuxDlog.CbType.Text = ""
AuxDlog.TbID.Text = "" '!!! Vorher Type setzen weil ID beim ändern von Type überschrieben wird !!!"
lbDlog:
lbDlog:
If AuxDlog.ShowDialog = Windows.Forms.DialogResult.OK Then
ID = UCase(Trim(AuxDlog.TbID.Text))
......@@ -828,7 +825,7 @@ Public Class F_VECTO
SelItem = LvAux.SelectedItems(0)
AuxDlog.VehPath = fPATH(VECTOfile)
AuxDlog.CbType.SelectedIndex = - 1
AuxDlog.CbType.SelectedIndex = -1
AuxDlog.CbType.Text = SelItem.SubItems(1).Text
AuxDlog.TbID.Text = SelItem.SubItems(0).Text 'After Type-set!
......@@ -847,7 +844,7 @@ Public Class F_VECTO
End If
Else
AuxDlog.CbTech.SelectedIndex = - 1
AuxDlog.CbTech.SelectedIndex = -1
AuxDlog.TbPath.Text = SelItem.SubItems(2).Text
End If
......@@ -1156,7 +1153,7 @@ Public Class F_VECTO
End If
Me.TbEngTxt.Text = (ENG0.Displ/1000).ToString("0.0") & " l " & pmax.ToString("#") & " kW " & ENG0.ModelName
Me.TbEngTxt.Text = (ENG0.Displ / 1000).ToString("0.0") & " l " & pmax.ToString("#") & " kW " & ENG0.ModelName
MAP0 = New cMAP
......@@ -1354,119 +1351,117 @@ Public Class F_VECTO
#End Region
'AA-TB
Private Sub picAuxInfo_MouseEnter(sender As Object, e As EventArgs) Handles picAuxInfo.MouseEnter
If cboAdvancedAuxiliaries.SelectedIndex = -1 Then Exit Sub
'Get tooltip
Dim item As cAdvancedAuxiliary
item = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary)
If item.AuxiliaryVersion = "CLASSIC" Then
ToolTip1.ToolTipTitle = "Classic Vecto Auxiliaries"
ToolTip1.SetToolTip(picAuxInfo, "Uses original basic auxiliaries calculation")
Else
ToolTip1.ToolTipTitle = "Advanced Auxiliary Information"
ToolTip1.SetToolTip(picAuxInfo, item.AuxiliaryName & " : Version=" & item.AuxiliaryVersion)
'AA-TB
Private Sub picAuxInfo_MouseEnter(sender As Object, e As EventArgs) Handles picAuxInfo.MouseEnter
End If
If cboAdvancedAuxiliaries.SelectedIndex = -1 Then Exit Sub
'Get tooltip
Dim item As cAdvancedAuxiliary
item = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary)
If item.AuxiliaryVersion = "CLASSIC" Then
ToolTip1.ToolTipTitle = "Classic Vecto Auxiliaries"
ToolTip1.SetToolTip(picAuxInfo, "Uses original basic auxiliaries calculation")
End Sub
'AA-TB
Private Sub btnBrowseAAUXFile_Click(sender As Object, e As EventArgs) Handles btnBrowseAAUXFile.Click
Else
If String.IsNullOrEmpty(VECTOfile) Then
MessageBox.Show("Please complete and save a valid new .vecto file before adding/configuring advanced bus auxiliaries.")
Return
End If
ToolTip1.ToolTipTitle = "Advanced Auxiliary Information"
ToolTip1.SetToolTip(picAuxInfo, item.AuxiliaryName & " : Version=" & item.AuxiliaryVersion)
Dim aauxFileValidated As Boolean = False
Dim fbAux As New cFileBrowser(True, False)
Dim message As String = String.Empty
Dim absoluteAuxPath As String
Dim assembly As cAdvancedAuxiliary
End If
End Sub
'If Classic is selected, then bail
If cboAdvancedAuxiliaries.SelectedIndex = 0 Then Return
'AA-TB
Private Sub btnBrowseAAUXFile_Click(sender As Object, e As EventArgs) Handles btnBrowseAAUXFile.Click
'Get Absolute Path for AAUX FILE.
absoluteAuxPath = mAAUX_Global.ResolveAAUXFilePath(fPATH(VECTOfile), txtAdvancedAuxiliaryFile.Text)
If String.IsNullOrEmpty(VECTOfile) Then
MessageBox.Show(
"Please complete and save a valid new .vecto file before adding/configuring advanced bus auxiliaries.")
Return
End If
'Set Extensions
fbAux.Extensions = New String() {"AAUX"}
Dim aauxFileValidated As Boolean = False
Dim fbAux As New cFileBrowser(True, False)
Dim message As String = String.Empty
Dim absoluteAuxPath As String
Dim assembly As cAdvancedAuxiliary
Try
'If Classic is selected, then bail
If cboAdvancedAuxiliaries.SelectedIndex = 0 Then Return
assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary)
'Get Absolute Path for AAUX FILE.
absoluteAuxPath = mAAUX_Global.ResolveAAUXFilePath(fPATH(VECTOfile), txtAdvancedAuxiliaryFile.Text)
Dim validAAUXFile As Boolean = mAAUX_Global.ValidateAAUXFile(absoluteAuxPath, assembly.AssemblyName, assembly.AuxiliaryVersion, message)
Dim fileExists As Boolean = IO.File.Exists(absoluteAuxPath)
'Set Extensions
fbAux.Extensions = New String() {"AAUX"}
If fileExists AndAlso validAAUXFile Then
mAAUX_Global.ConfigureAdvancedAuxiliaries(assembly.AssemblyName, assembly.AuxiliaryVersion, txtAdvancedAuxiliaryFile.Text, VECTOfile)
Else
Try
Dim needToFindOrCreateFile As Boolean = True
assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary)
While needToFindOrCreateFile
Dim validAAUXFile As Boolean = mAAUX_Global.ValidateAAUXFile(absoluteAuxPath, assembly.AssemblyName,
assembly.AuxiliaryVersion, message)
Dim fileExists As Boolean = IO.File.Exists(absoluteAuxPath)
'Find / Create file and configure.
If fbAux.CustomDialog(absoluteAuxPath, False, False, tFbExtMode.ForceExt, False, String.Empty) Then
txtAdvancedAuxiliaryFile.Text = fFileWoDir(fbAux.Files(0), fPATH(VECTOfile))
assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary)
If fileExists AndAlso validAAUXFile Then
mAAUX_Global.ConfigureAdvancedAuxiliaries(assembly.AssemblyName, assembly.AuxiliaryVersion,
txtAdvancedAuxiliaryFile.Text, VECTOfile)
Else
If IO.File.Exists(mAAUX_Global.ResolveAAUXFilePath(fPATH(VECTOfile), txtAdvancedAuxiliaryFile.Text)) OrElse MsgBox("Do you want to create a new .AAUX file?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
needToFindOrCreateFile = False
mAAUX_Global.ConfigureAdvancedAuxiliaries(assembly.AssemblyName, assembly.AuxiliaryVersion, txtAdvancedAuxiliaryFile.Text, VECTOfile)
End If
Else
needToFindOrCreateFile = False
End If
Dim needToFindOrCreateFile As Boolean = True
End While
While needToFindOrCreateFile
End If
'Find / Create file and configure.
If fbAux.CustomDialog(absoluteAuxPath, False, False, tFbExtMode.ForceExt, False, String.Empty) Then
txtAdvancedAuxiliaryFile.Text = fFileWoDir(fbAux.Files(0), fPATH(VECTOfile))
assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary)
Catch ex As Exception
MessageBox.Show("There was an error configuring your Advanced Auxiliary File")
End Try
If _
IO.File.Exists(mAAUX_Global.ResolveAAUXFilePath(fPATH(VECTOfile), txtAdvancedAuxiliaryFile.Text)) OrElse
MsgBox("Do you want to create a new .AAUX file?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
needToFindOrCreateFile = False
mAAUX_Global.ConfigureAdvancedAuxiliaries(assembly.AssemblyName, assembly.AuxiliaryVersion,
txtAdvancedAuxiliaryFile.Text, VECTOfile)
End If
Else
needToFindOrCreateFile = False
End If
End Sub
End While
'AA-TB
Private Sub cboAdvancedAuxiliaries_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboAdvancedAuxiliaries.SelectedIndexChanged
End If
'Enable or otherwise the text box and browser button associated with Advanced Axuiliaries
If cboAdvancedAuxiliaries.SelectedIndex = 0 Then
Catch ex As Exception
MessageBox.Show("There was an error configuring your Advanced Auxiliary File")
End Try
End Sub
btnBrowseAAUXFile.Enabled = False
txtAdvancedAuxiliaryFile.Enabled = False
'AA-TB
Private Sub cboAdvancedAuxiliaries_SelectedIndexChanged(sender As Object, e As EventArgs) _
Handles cboAdvancedAuxiliaries.SelectedIndexChanged
Else
'Enable or otherwise the text box and browser button associated with Advanced Axuiliaries
If cboAdvancedAuxiliaries.SelectedIndex = 0 Then
btnBrowseAAUXFile.Enabled = True
txtAdvancedAuxiliaryFile.Enabled = True
btnBrowseAAUXFile.Enabled = False
txtAdvancedAuxiliaryFile.Enabled = False
End If
Else
End Sub
btnBrowseAAUXFile.Enabled = True
txtAdvancedAuxiliaryFile.Enabled = True
'AA-TB
Private Sub btnAAUXOpen_Click(sender As Object, e As EventArgs) Handles btnAAUXOpen.Click
End If
End Sub
OpenFiles(fFileRepl(Me.txtAdvancedAuxiliaryFile.Text, fPATH(VECTOfile)))
'AA-TB
Private Sub btnAAUXOpen_Click(sender As Object, e As EventArgs) Handles btnAAUXOpen.Click
End Sub
OpenFiles(fFileRepl(Me.txtAdvancedAuxiliaryFile.Text, fPATH(VECTOfile)))
End Sub
End Class
This diff is collapsed.
This diff is collapsed.
......@@ -1508,10 +1508,8 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>ROBOCOPY "$(ProjectDir)..\Generic Vehicles" "$(TargetDir)Generic Vehicles" /E
ROBOCOPY "$(ProjectDir)..\User Manual" "$(TargetDir)User Manual" /E
ROBOCOPY "$(ProjectDir)..\Declaration" "$(TargetDir)Declaration" /E
ROBOCOPY "$(ProjectDir)..\AAUXData" "$(TargetDir)AAUXData" /E</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
......@@ -2,163 +2,154 @@
Imports System.Text
Namespace Hvac
Public Class BusDatabase
Implements IBusDatabase
Private buses As New List(Of IBus)
Private selectListBuses As New List(Of IBus)
Public Class BusDatabase
Implements IBusDatabase
Public Function AddBus(bus As IBus) As Boolean Implements IBusDatabase.AddBus
Private buses As New List(Of IBus)
Private selectListBuses As New List(Of IBus)
Dim result As Boolean = True
Public Function AddBus(bus As IBus) As Boolean Implements IBusDatabase.AddBus
Try
buses.Add(bus)
Catch ex As Exception
result = False
End Try
Dim result As Boolean = True
Return result
End Function
Try
buses.Add(bus)
Catch ex As Exception
result = False
End Try
Public Function GetBuses(busModel As String, Optional AsSelectList As Boolean = False) As List(Of IBus) _
Implements IBusDatabase.GetBuses
Return result
End Function
If AsSelectList Then
selectListBuses = New List(Of IBus)
selectListBuses = buses.Where(Function(v) v.Model = "" OrElse v.Model.ToLower.Contains(busModel.ToLower)).ToList()
selectListBuses.Insert(0, New Bus(0, "<Select>", "low floor", "gas", 1, 1, 1, 2, False))
Return selectListBuses
Public Function GetBuses(busModel As String, Optional AsSelectList As Boolean = False) As List(Of IBus) Implements IBusDatabase.GetBuses
Else
If AsSelectList Then
selectListBuses = New List(Of IBus)
selectListBuses = buses.Where(Function(v) v.Model = "" OrElse v.Model.ToLower.Contains(busModel.ToLower)).ToList()
selectListBuses.Insert(0, New Bus(0, "<Select>", "low floor", "gas", 1, 1, 1, 2, False))
Return selectListBuses
Return buses.Where(Function(v) v.Model = "" OrElse v.Model.ToLower.Contains(busModel.ToLower)).ToList()
Else
End If
End Function
Return buses.Where(Function(v) v.Model = "" OrElse v.Model.ToLower.Contains(busModel.ToLower)).ToList()
Public Function Initialise(filepath As String) As Boolean Implements IBusDatabase.Initialise
End If
Dim returnStatus As Boolean = True
End Function
If File.Exists(filepath) Then
Using sr As StreamReader = New StreamReader(filepath)
'get array og lines fron csv
Dim lines() As String = sr.ReadToEnd().Split(CType(Environment.NewLine, Char()),
StringSplitOptions.RemoveEmptyEntries)
Public Function Initialise(filepath As String) As Boolean Implements IBusDatabase.Initialise
'Must have at least 2 entries in map to make it usable [dont forget the header row]
If (lines.Count() < 2) Then
Return False
End If
Dim returnStatus As Boolean = True
Dim firstline As Boolean = True
If File.Exists(filepath) Then
Using sr As StreamReader = New StreamReader(filepath)
'get array og lines fron csv
Dim lines() As String = sr.ReadToEnd().Split(CType(Environment.NewLine, Char()), StringSplitOptions.RemoveEmptyEntries)
Dim id As Integer = 1
'Must have at least 2 entries in map to make it usable [dont forget the header row]
If (lines.Count() < 2) Then
Return False
End If
For Each line As String In lines
If Not firstline Then
Dim firstline As Boolean = True
'split the line
Dim elements() As String = line.Split(New Char() {","}, StringSplitOptions.RemoveEmptyEntries)
'7 or 8 entries per line required
If (elements.Length <> 7 AndAlso elements.Length <> 8) Then
Throw New ArgumentException("Incorrect number of values in csv file")
End If
Dim id As Integer = 1
'Bus
Try
Dim bus As New Bus(id,
elements(0),
elements(1),
elements(2),
elements(3),
elements(4),
elements(5),
elements(6),
If(elements.Length = 8, Boolean.Parse(elements(7)), False))
For Each line As String In lines
If Not firstline Then
buses.Add(bus)
'split the line
Dim elements() As String = line.Split(New Char() {","}, StringSplitOptions.RemoveEmptyEntries)
'7 or 8 entries per line required
If (elements.Length <> 7 AndAlso elements.Length <> 8) Then
Throw New ArgumentException("Incorrect number of values in csv file")
End If
Catch ex As Exception
'Bus
Try
Dim bus As New Bus(id, _
elements(0), _
elements(1), _
elements(2), _
elements(3), _
elements(4), _
elements(5), _
elements(6), _
If(elements.Length = 8, Boolean.Parse(elements(7)), False))
'Indicate problems
returnStatus = False
buses.Add(bus)
End Try
Catch ex As Exception
id = id + 1
Else
firstline = False
End If
Next line
End Using
'Indicate problems
returnStatus = False
Else
returnStatus = False
End If
End Try
Dim uniqueBuses As Object = From b In buses Select New With {Key b.Model, b} Distinct.ToList()
id = id + 1
Else
firstline = False
End If
Next line
End Using
If buses.Count <> uniqueBuses.Count Then
returnStatus = False
End If
Else
returnStatus = False
End If
Return returnStatus
End Function
Dim uniqueBuses = From b In buses Select New With {Key b.Model, b} Distinct.ToList()
Public Function UpdateBus(id As Integer, bus As IBus) As Boolean Implements IBusDatabase.UpdateBus
If buses.Count <> uniqueBuses.Count Then
returnStatus = False
End If
Dim result As Boolean = True
Return returnStatus
Try
End Function
Dim existingBus As IBus = buses.Single(Function(b) b.Id = id)
Public Function UpdateBus(id As Integer, bus As IBus) As Boolean Implements IBusDatabase.UpdateBus
existingBus.Model = bus.Model
existingBus.RegisteredPassengers = bus.RegisteredPassengers
existingBus.FloorType = bus.FloorType
existingBus.LengthInMetres = bus.LengthInMetres
existingBus.WidthInMetres = bus.WidthInMetres
existingBus.HeightInMetres = bus.HeightInMetres
existingBus.IsDoubleDecker = bus.IsDoubleDecker
Dim result As Boolean = True
Catch ex As Exception
result = False
End Try
Try
Return result
End Function
Dim existingBus As IBus = buses.Single(Function(b) b.Id = id)
Public Function Save(filepath As String) As Boolean Implements IBusDatabase.Save
existingBus.Model = bus.Model
existingBus.RegisteredPassengers = bus.RegisteredPassengers
existingBus.FloorType = bus.FloorType
existingBus.LengthInMetres = bus.LengthInMetres
existingBus.WidthInMetres = bus.WidthInMetres
existingBus.HeightInMetres = bus.HeightInMetres
existingBus.IsDoubleDecker = bus.IsDoubleDecker
Dim result As Boolean = True
Dim output As New StringBuilder
Catch ex As Exception
result = False
End Try
Return result
End Function
Public Function Save(filepath As String) As Boolean Implements IBusDatabase.Save
Dim result As Boolean = True
Dim output As New StringBuilder
Try
output.AppendLine("Bus Model,Type,engine Type,length in m,wide in m,height in m,registered passengers,double decker")
For Each bus As IBus In buses
output.AppendLine(bus.ToString())
Next
File.WriteAllText(filepath, output.ToString())
Catch ex As Exception
result = False
End Try
Return result
End Function
End Class
Try
output.AppendLine("Bus Model,Type,engine Type,length in m,wide in m,height in m,registered passengers,double decker")
For Each bus As IBus In buses
output.AppendLine(bus.ToString())
Next
File.WriteAllText(filepath, output.ToString())
Catch ex As Exception
result = False
End Try
Return result
End Function
End Class
End Namespace
......@@ -267,12 +267,6 @@
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\AdvancedAuxiliaryInterfaces\AdvancedAuxiliaryInterfaces.vbproj">
<Project>{b4b9bd2f-fd8f-4bb8-82fa-e2154d2c7fbd}</Project>
<Name>AdvancedAuxiliaryInterfaces</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="3rdPartyLibraries\" />
</ItemGroup>
......@@ -288,6 +282,12 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\AdvancedAuxiliaryInterfaces\AdvancedAuxiliaryInterfaces.vbproj">
<Project>{b4b9bd2f-fd8f-4bb8-82fa-e2154d2c7fbd}</Project>
<Name>AdvancedAuxiliaryInterfaces</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
Imports VectoAuxiliaries.Pneumatics
Imports VectoAuxiliaries
Imports VectoAuxiliaries.Pneumatics
Namespace Mocks
Public Class CompressorMapMock
Implements ICompressorMap
Public Class CompressorMapMock
Implements ICompressorMap
Dim failing As Boolean
Public Sub New(ByVal isFailing As Boolean)
failing = isFailing
End Sub
Public Function Initialise() As Boolean Implements ICompressorMap.Initialise
If failing Then
Throw New System.ArgumentException
Else
Return True
End If
End Function
Dim failing As Boolean
Public Function GetFlowRate(ByVal rpm As Integer) As Single Implements ICompressorMap.GetFlowRate
Return 2.0
End Function
Public Sub New(ByVal isFailing As Boolean)
failing = isFailing
End Sub
Public Function GetPowerCompressorOn(ByVal rpm As Integer) As Single Implements ICompressorMap.GetPowerCompressorOn
Return 8.0
End Function
Public Function Initialise() As Boolean Implements ICompressorMap.Initialise
If failing Then
Throw New System.ArgumentException
Else
Return True
End If
End Function
Public Function GetPowerCompressorOff(ByVal rpm As Integer) As Single Implements ICompressorMap.GetPowerCompressorOff
Return 5.0
End Function
Public Function GetFlowRate(ByVal rpm As Integer) As Single Implements ICompressorMap.GetFlowRate
Return 2.0
End Function
Public Function GetPowerCompressorOn(ByVal rpm As Integer) As Single Implements ICompressorMap.GetPowerCompressorOn
Return 8.0
End Function
Public Function GetAveragePowerDemandPerCompressorUnitFlowRate() As Single _
Implements ICompressorMap.GetAveragePowerDemandPerCompressorUnitFlowRate
Public Function GetPowerCompressorOff(ByVal rpm As Integer) As Single Implements ICompressorMap.GetPowerCompressorOff
Return 5.0
End Function
Return 0.01
End Function
Public Function GetAveragePowerDemandPerCompressorUnitFlowRate() As Single Implements ICompressorMap.GetAveragePowerDemandPerCompressorUnitFlowRate
Return 0.01
End Function
Public Event AuxiliaryEvent(ByRef sender As Object, message As String, messageType As VectoAuxiliaries.AdvancedAuxiliaryMessageType) Implements VectoAuxiliaries.IAuxiliaryEvent.AuxiliaryEvent
End Class
Public Event AuxiliaryEvent(ByRef sender As Object, message As String, messageType As AdvancedAuxiliaryMessageType) _
Implements IAuxiliaryEvent.AuxiliaryEvent
End Class
End Namespace
\ No newline at end of file
......@@ -56,7 +56,7 @@
<Reference Include="DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Moq">
<HintPath>..\..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll</HintPath>
<HintPath>..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
......@@ -99,6 +99,8 @@
<Import Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>
<ItemGroup>
<Compile Include="Mocks\AlternatorMapMock.vb" />
<Compile Include="Mocks\CompressorMapMock.vb" />
<Compile Include="UnitTests\AuxiliaryEnvironmentComparisonTests.vb" />
<Compile Include="Mocks\M1_Mock.vb" />
<Compile Include="Mocks\M2_Mock.vb" />
......@@ -135,8 +137,6 @@
<Compile Include="UnitTests\M2_AverageElectricalLoadTests.vb" />
<Compile Include="UnitTests\CompressorMapTests.vb" />
<Compile Include="UnitTests\ElectricalConsumerTests.vb" />
<Compile Include="Mocks\AlternatorMapMock.vb" />
<Compile Include="Mocks\CompressorMapMock.vb" />
<Compile Include="Mocks\ElectricalConsumerMock.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
......@@ -322,19 +322,19 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="IntegrationTests\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\AdvancedAuxiliaryInterfaces\AdvancedAuxiliaryInterfaces.vbproj">
<Project>{b4b9bd2f-fd8f-4bb8-82fa-e2154d2c7fbd}</Project>
<Name>AdvancedAuxiliaryInterfaces</Name>
</ProjectReference>
<ProjectReference Include="..\VectoAuxiliaries\VectoAuxiliaries.vbproj">
<Project>{FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}</Project>
<Project>{fdeee460-0b8a-4ef6-8d9e-72f203a50f65}</Project>
<Name>VectoAuxiliaries</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="IntegrationTests\" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Moq" version="4.2.1409.1722" targetFramework="net40" />
<package id="Moq" version="4.2.1510.2205" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
<package id="NUnit" version="2.6.2" targetFramework="net45" />
</packages>
\ No newline at end of file
File deleted
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Moq</id>
<version>4.2.1409.1722</version>
<title>Moq: an enjoyable mocking library</title>
<authors>Daniel Cazzulino, kzu</authors>
<owners>Daniel Cazzulino, kzu</owners>
<licenseUrl>http://www.opensource.org/licenses/bsd-license.php</licenseUrl>
<projectUrl>http://www.moqthis.com/</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Moq is the most popular and friendly mocking framework for .NET</description>
<releaseNotes>Version 4.3
* Added support for Roslyn
* Automatically add implemented interfaces to mock
Version 4.2
* Improved support for async APIs by making default value a completed task
* Added support for async Returns and Throws
* Improved mock invocation sequence testing
* Improved support for multi-threaded tests
* Added support for named mocks
Version 4.1
* Added covariant IMock&lt;out T&gt; interface to Mock&lt;T&gt;
* Added It.IsNotNull&lt;T&gt;
* Fix: 'NullReferenceException when subscribing to an event'
* Added overloads to Verify to accept Times as a Method Group
* Feature request: It.IsIn(..), It.IsNotIn(...)
* Corrected Verify method behavior for generic methods calls
* Differentiate verification error from mock crash
* Fix: Adding (and removing) handlers for events declared on interfaces works
when CallBase = true.
* Update to latest Castle
* Fix: Mock.Of (Functional Syntax) doesn't work on properties with non-public setters
* Fix: Allow to use CallBase instead of Returns
* Fix: Solved Multi-threading issue - IndexOutOfRangeException
* Capability of mocking delegates (event handlers)
Version 4.0
* Linq to Mocks: Mock.Of&lt;T&gt;(x =&gt; x.Id == 23 &amp;&amp; x.Title == "Rocks!")
* Fixed issues:
* 87 BadImageFormatException when using a mock with a Visual Studio generated Accessor object
* 166 Unable to use a delegate to mock a function that takes 5 or more parameters.
* 168 Call count failure message never says which is the actual invocation count
* 175 theMock.Object failing on VS2010 Beta 1
* 177 Generic constraint on interface method causes BadImageFormatException when getting Object.
* 183 Display what invocations were recieved when the expected one hasn't been met
* 186 Methods that are not virtual gives non-sense-exception message
* 188 More Callback Overloads
* 199 Simplify SetupAllProperties implementation to simply iterate and call SetupProperty
* 200 Fluent mock does not honor parent mock CallBase setting.
* 202 Mock.Protected().Expect() deprecated with no work-around
* 204 Allow default return values to be specified (per-mock)
* 205 Error calling SetupAllProperties for Mock&lt;IDataErrorInfo&gt;
* 206 Linq-to-Mocks Never Returns on Implicit Boolean Property
* 207 NullReferenceException thrown when using Mocks.CreateQuery with implicit boolean expression
* 208 Can't setup a mock for method that accept lambda expression as argument.
* 211 SetupAllProperties should return the Mock&lt;T&gt; instead of void.
* 223 When a method is defined to make the setup an asserts mock fails
* 226 Can't raise events on mocked Interop interfaces
* 229 CallBase is not working for virtual events
* 238 Moq fails to mock events defined in F#
* 239 Use Func instead of Predicate
* 250 4.0 Beta 2 regression - cannot mock MethodInfo when targetting .NET 4
* 251 When a generic interface also implements a non-generic version, Verify does not work in some cases
* 254 Unable to create mock of EnvDTE.DTE
* 261 Can not use protected setter in public property
* 267 Generic argument as dependency for method Setup overrides all previous method setups for a given method
* 273 Attempting to create a mock thrown a Type Load exception. The message refers to an inaccessible interface.
* 276 .Net 3.5 no more supported
Version 3.0
* Silverlight support! Finally integrated Jason's Silverlight contribution! Issue #73
* Brand-new simplified event raising syntax (#130): mock.Raise(foo =&gt; foo.MyEvent += null, new MyArgs(...));
* Support for custom event signatures (not compatible with EventHandler): mock.Raise(foo =&gt; foo.MyEvent += null, arg1, arg2, arg3);
* Substantially improved property setter behavior: mock.VerifySet(foo =&gt; foo.Value = "foo"); //(also available for SetupSet
* Renamed Expect* with Setup*
* Vastly simplified custom argument matchers: public int IsOdd() &lt; return Match&lt;int&gt;.Create(v =&gt; i % 2 == 0); &gt;
* Added support for verifying how many times a member was invoked: mock.Verify(foo =&gt; foo.Do(), Times.Never());
* Added simple sample app named StoreSample
* Moved Stub functionality to the core API (SetupProperty and SetupAllProperties)
* Fixed sample ASP.NET MVC app to work with latest version
* Allow custom matchers to be created with a substantially simpler API
* Fixed issue #145 which prevented discrimination of setups by generic method argument types
* Fixed issue #141 which prevented ref arguments matching value types (i.e. a Guid)
* Implemented improvement #131: Add support for It.IsAny and custom argument matchers for SetupSet/VerifySet
* Implemented improvement #124 to render better error messages
* Applied patch from David Kirkland for improvement #125 to improve matching of enumerable parameters
* Implemented improvement #122 to provide custom errors for Verify
* Implemented improvement #121 to provide null as default value for Nullable&lt;T&gt;
* Fixed issue #112 which fixes passing a null argument to a mock constructor
* Implemented improvement #111 to better support params arguments
* Fixed bug #105 about improperly overwriting setups for property getter and setter
* Applied patch from Ihar.Bury for issue #99 related to protected expectations
* Fixed issue #97 on not being able to use SetupSet/VerifySet if property did not have a getter
* Better integration with Pex (http://research.microsoft.com/en-us/projects/Pex/)
* Various other minor fixes (#134, #135, #137, #138, #140, etc.)
Version 2.6
* Implemented Issue #55: We now provide a mock.DefaultValue = [DefaultValue.Empty | DefaultValue.Mock] which will provide the current behavior (default) or mocks for mockeable return types for loose mock invocations without expectations.
* Added support for stubbing properties from moq-contrib: now you can do mock.Stub(m =&gt; m.Value) and add stub behavior to the property. mock.StubAll() is also provided. This integrates with the DefaultValue behavior too, so you can stub entire hierarchies :).
* Added support for mocking methods with out and ref parameters (Issue #50)
* Applied patch contributed by slava for Issue #72: add support to limit numbor of calls on mocked method (we now have mock.Expect(...).AtMost(5))
* Implemented Issue #94: Easier setter verification: Now we support ExpectSet(m = m.Value, "foo") and VerifySet(m = m.Value, 5) (Thanks ASP.NET MVC Team!)
* Implemented issue #96: Automatically chain mocks when setting expectations. It's now possible to specify expectations for an entire hierarchy of objects just starting from the root mock. THIS IS REALLY COOL!!!
* Fixed Issue #89: Expects() does not always return last expectation
* Implemented Issue 91: Expect a method/property to never be called (added Never() method to an expectation. Can be used on methods, property getters and setters)
* Fixed Issue 86: IsAny&lt;T&gt; should check if the value is actually of type T
* Fixed Issue 88: Cannot mock protected internal virtual methods using Moq.Protected
* Fixed Issue 90: Removing event handlers from mocked objects
* Updated demo and added one more test for the dynamic addition of interfaces
Version 2.5
* Added support for mocking protected members
* Added new way of extending argument matchers which is now very straightforward
* Added support for mocking events
* Added support for firing events from expectations
* Removed usage of MBROs which caused inconsistencies in mocking features
* Added ExpectGet and ExpectSet to better support properties, and provide better intellisense.
* Added verification with expressions, which better supports Arrange-Act-Assert testing model (can do Verify(m =&gt; m.Do(...)))
* Added Throws&lt;TException&gt;
* Added mock.CallBase property to specify whether the virtual members base implementation should be called
* Added support for implementing and setting expectations and verifying additional interfaces in the mock, via the new mock.As&lt;TInterface&gt;() method (thanks Fernando Simonazzi!)
* Improved argument type matching for Is/IsAny (thanks Jeremy.Skinner!)
Version 2.0
* Refactored fluent API on mocks. This may cause some existing tests to fail, but the fix is trivial (just reorder the calls to Callback, Returns and Verifiable)
* Added support for retrieving a Mock&lt;T&gt; from a T instance created by a mock.
* Added support for retrieving the invocation arguments from a Callback or Returns.
* Implemented AtMostOnce() constraint
* Added support for creating MBROs with protected constructors
* Loose mocks now return default empty arrays and IEnumerables instead of nulls
Version 1.5.1
* Refactored MockFactory to make it simpler and more explicit to use with regards to verification. Thanks Garry Shutler for the feedback!
Version 1.5
* Added MockFactory to allow easy construction of multiple mocks with the same behavior and verification
Version 1.4
* Added support for passing constructor arguments for mocked classes.
* Improved code documentation
Version 1.3
* Added support for overriding expectations set previously on a Mock. Now adding a second expectation for the same method/property call will override the existing one. This facilitates setting up default expectations in a fixture setup and overriding when necessary in a specific test.
* Added support for mock verification. Both Verify and VerifyAll are provided for more flexibility (the former only verifies methods marked Verifiable)
Version 1.2
* Added support for MockBehavior mock constructor argument to affect the way the mocks expect or throw on calls.
Version 1.1
* Merged branch for dynamic types. Now Moq is based on Castle DynamicProxy2 to support a wider range of mock targets.
* Added ILMerge so that Castle libraries are merged into Moq assembly (no need for external references and avoid conflicts)
Version 1.0
* Initial release, initial documentation process in place, etc.</releaseNotes>
<tags>moq tdd mocking mocks unittesting agile unittest</tags>
</metadata>
</package>
\ No newline at end of file
File deleted
This diff is collapsed.
File deleted
This diff is collapsed.
File deleted
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\VECTO\packages.config" />
<repository path="..\VECTOAux\VectoAuxiliaries\packages.config" />
<repository path="..\VECTOAux\VectoAuxiliariesTests\packages.config" />
<repository path="..\VectoConsole\packages.config" />
<repository path="..\VectoCore\packages.config" />
<repository path="..\VectoCoreTest\packages.config" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment