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

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

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

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

@ -26,6 +26,15 @@ namespace XmlEditor.Tests.Utils @@ -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;
protected virtual void OnDisposed(EventArgs e)
@ -77,6 +86,12 @@ namespace XmlEditor.Tests.Utils @@ -77,6 +86,12 @@ namespace XmlEditor.Tests.Utils
}
}
public string InfoTip {
get {
throw new NotImplementedException();
}
}
public System.Collections.Generic.IList<ICSharpCode.SharpDevelop.OpenedFile> Files {
get {
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 @@ -23,11 +23,12 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
{
}
public event EventHandler TitleNameChanged;
public event EventHandler TabPageTextChanged;
public event EventHandler Disposed;
public event EventHandler InfoTipChanged;
public event EventHandler TitleNameChanged;
public event EventHandler TabPageTextChanged;
public event EventHandler Disposed;
public event EventHandler IsDirtyChanged;
public object Control
{
get {return null;}
@ -37,11 +38,14 @@ namespace ICSharpCode.Reports.Addin.Test.Designer @@ -37,11 +38,14 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
get {
throw new NotImplementedException();
}
set {
}
public string InfoTip {
get {
throw new NotImplementedException();
}
}
public bool IsReadOnly {
get {
throw new NotImplementedException();
@ -160,7 +164,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer @@ -160,7 +164,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
throw new NotImplementedException();
}
}
public void Save(OpenedFile file, System.IO.Stream stream)
{
throw new NotImplementedException();
@ -190,7 +194,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer @@ -190,7 +194,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
{
throw new NotImplementedException();
}
protected virtual void OnTitleNameChanged(EventArgs e)
{
if (TitleNameChanged != null) {
@ -198,6 +202,13 @@ namespace ICSharpCode.Reports.Addin.Test.Designer @@ -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)
{
if (TabPageTextChanged != null) {
@ -217,7 +228,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer @@ -217,7 +228,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
if (IsDirtyChanged != null) {
IsDirtyChanged(this, e);
}
}
}
public object InitiallyFocusedControl {
get {

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

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

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

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

Loading…
Cancel
Save