Browse Source

Adjust unit tests to IViewContent interface change.

pull/12/head
Daniel Grunwald 15 years ago
parent
commit
8c1f9b3a02
  1. 27
      src/AddIns/BackendBindings/Scripting/Test/Utils/MockViewContent.cs
  2. 7
      src/AddIns/BackendBindings/WixBinding/Test/Utils/MockViewContent.cs
  3. 15
      src/AddIns/DisplayBindings/XmlEditor/Test/Utils/MockViewContent.cs
  4. 29
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/Designer/MockViewContend.cs
  5. 10
      src/Main/Base/Project/Src/Gui/AbstractViewContent.cs
  6. 8
      src/Main/Base/Project/Src/Util/FakeXmlViewContent.cs

27
src/AddIns/BackendBindings/Scripting/Test/Utils/MockViewContent.cs

@ -21,20 +21,24 @@ namespace ICSharpCode.Scripting.Tests.Utils
{ {
} }
public event EventHandler TitleNameChanged; public event EventHandler InfoTipChanged;
public event EventHandler TabPageTextChanged; public event EventHandler TitleNameChanged;
public event EventHandler Disposed; public event EventHandler TabPageTextChanged;
public event EventHandler Disposed;
public event EventHandler IsDirtyChanged; public event EventHandler IsDirtyChanged;
public string TitleName { public string TitleName {
get { get {
throw new NotImplementedException(); throw new NotImplementedException();
} }
set { }
public string InfoTip {
get {
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
public bool IsReadOnly { public bool IsReadOnly {
get { get {
throw new NotImplementedException(); throw new NotImplementedException();
@ -164,7 +168,7 @@ namespace ICSharpCode.Scripting.Tests.Utils
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
public void Save(OpenedFile file, System.IO.Stream stream) public void Save(OpenedFile file, System.IO.Stream stream)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
@ -194,7 +198,7 @@ namespace ICSharpCode.Scripting.Tests.Utils
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
protected virtual void OnTitleNameChanged(EventArgs e) protected virtual void OnTitleNameChanged(EventArgs e)
{ {
if (TitleNameChanged != null) { if (TitleNameChanged != null) {
@ -202,6 +206,13 @@ namespace ICSharpCode.Scripting.Tests.Utils
} }
} }
protected virtual void OnInfoTipChanged(EventArgs e)
{
if (InfoTipChanged != null) {
InfoTipChanged(this, e);
}
}
protected virtual void OnTabPageTextChanged(EventArgs e) protected virtual void OnTabPageTextChanged(EventArgs e)
{ {
if (TabPageTextChanged != null) { if (TabPageTextChanged != null) {

7
src/AddIns/BackendBindings/WixBinding/Test/Utils/MockViewContent.cs

@ -40,6 +40,7 @@ namespace WixBinding.Tests.Utils
public event EventHandler Disposed; public event EventHandler Disposed;
public event EventHandler IsDirtyChanged; public event EventHandler IsDirtyChanged;
public event EventHandler TitleNameChanged; public event EventHandler TitleNameChanged;
public event EventHandler InfoTipChanged;
#pragma warning restore 67 #pragma warning restore 67
public IList<OpenedFile> Files { public IList<OpenedFile> Files {
@ -129,6 +130,12 @@ namespace WixBinding.Tests.Utils
} }
} }
public string InfoTip {
get {
throw new NotImplementedException();
}
}
public bool IsReadOnly { public bool IsReadOnly {
get { get {
throw new NotImplementedException(); throw new NotImplementedException();

15
src/AddIns/DisplayBindings/XmlEditor/Test/Utils/MockViewContent.cs

@ -26,6 +26,15 @@ namespace XmlEditor.Tests.Utils
} }
} }
public event EventHandler InfoTipChanged;
protected virtual void OnInfoTipChanged(EventArgs e)
{
if (InfoTipChanged != null) {
InfoTipChanged(this, e);
}
}
public event EventHandler Disposed; public event EventHandler Disposed;
protected virtual void OnDisposed(EventArgs e) protected virtual void OnDisposed(EventArgs e)
@ -77,6 +86,12 @@ namespace XmlEditor.Tests.Utils
} }
} }
public string InfoTip {
get {
throw new NotImplementedException();
}
}
public System.Collections.Generic.IList<ICSharpCode.SharpDevelop.OpenedFile> Files { public System.Collections.Generic.IList<ICSharpCode.SharpDevelop.OpenedFile> Files {
get { get {
throw new NotImplementedException(); throw new NotImplementedException();

29
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/Designer/MockViewContend.cs

@ -23,11 +23,12 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
{ {
} }
public event EventHandler TitleNameChanged; public event EventHandler InfoTipChanged;
public event EventHandler TabPageTextChanged; public event EventHandler TitleNameChanged;
public event EventHandler Disposed; public event EventHandler TabPageTextChanged;
public event EventHandler Disposed;
public event EventHandler IsDirtyChanged; public event EventHandler IsDirtyChanged;
public object Control public object Control
{ {
get {return null;} get {return null;}
@ -37,11 +38,14 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
get { get {
throw new NotImplementedException(); throw new NotImplementedException();
} }
set { }
public string InfoTip {
get {
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
public bool IsReadOnly { public bool IsReadOnly {
get { get {
throw new NotImplementedException(); throw new NotImplementedException();
@ -160,7 +164,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
public void Save(OpenedFile file, System.IO.Stream stream) public void Save(OpenedFile file, System.IO.Stream stream)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
@ -190,7 +194,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
protected virtual void OnTitleNameChanged(EventArgs e) protected virtual void OnTitleNameChanged(EventArgs e)
{ {
if (TitleNameChanged != null) { if (TitleNameChanged != null) {
@ -198,6 +202,13 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
} }
} }
protected virtual void OnInfoTipChanged(EventArgs e)
{
if (InfoTipChanged != null) {
InfoTipChanged(this, e);
}
}
protected virtual void OnTabPageTextChanged(EventArgs e) protected virtual void OnTabPageTextChanged(EventArgs e)
{ {
if (TabPageTextChanged != null) { if (TabPageTextChanged != null) {
@ -217,7 +228,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
if (IsDirtyChanged != null) { if (IsDirtyChanged != null) {
IsDirtyChanged(this, e); IsDirtyChanged(this, e);
} }
} }
public object InitiallyFocusedControl { public object InitiallyFocusedControl {
get { get {

10
src/Main/Base/Project/Src/Gui/AbstractViewContent.cs

@ -408,10 +408,8 @@ namespace ICSharpCode.SharpDevelop.Gui
string infoTip; string infoTip;
LanguageDependentExtension infoTipLocalizeExtension; LanguageDependentExtension infoTipLocalizeExtension;
string IViewContent.InfoTip string IViewContent.InfoTip {
{ get {
get
{
if (infoTip != null) if (infoTip != null)
return infoTip; return infoTip;
else if (files.Count > 0) else if (files.Count > 0)
@ -419,10 +417,6 @@ namespace ICSharpCode.SharpDevelop.Gui
else else
return "[Default Info Tip]"; return "[Default Info Tip]";
} }
set
{
this.InfoTip = value;
}
} }
public string InfoTip public string InfoTip

8
src/Main/Base/Project/Src/Util/FakeXmlViewContent.cs

@ -133,10 +133,6 @@ namespace ICSharpCode.SharpDevelop.Util
get { get {
throw new NotImplementedException(); throw new NotImplementedException();
} }
set
{
throw new NotImplementedException();
}
} }
System.Collections.Generic.IList<OpenedFile> IViewContent.Files { System.Collections.Generic.IList<OpenedFile> IViewContent.Files {
@ -167,11 +163,7 @@ namespace ICSharpCode.SharpDevelop.Util
get { get {
throw new NotImplementedException(); throw new NotImplementedException();
} }
set {
throw new NotImplementedException();
}
} }
bool IViewContent.CloseWithSolution { bool IViewContent.CloseWithSolution {
get { get {

Loading…
Cancel
Save