Index: Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Tests.csproj =================================================================== diff -u --- Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Tests.csproj (revision 0) +++ Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Tests.csproj (revision cbb3c7e4f06665f1fc399e839bd0f370f8f13278) @@ -0,0 +1,66 @@ + + + + Debug + AnyCPU + {D5EC1DF2-03C9-467B-B6AF-BE5AC83417F8} + Library + Properties + Core.Common.Gui.Tests + Core.Common.Gui.Tests + v4.0 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + False + UnitTest + false + + + x86 + bin\Debug\ + false + DEBUG;TRACE + + + x86 + bin\Release\ + TRACE + true + + + + False + ..\..\..\..\lib\nunit.framework.dll + + + + + + + + + + + + + + + {30e4c2ae-719e-4d70-9fa9-668a9767fbfa} + Core.Common.Gui + + + {D749EE4C-CE50-4C17-BF01-9A953028C126} + Core.Common.TestUtils + + + + + \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreenTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreenTest.cs (revision 0) +++ Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreenTest.cs (revision cbb3c7e4f06665f1fc399e839bd0f370f8f13278) @@ -0,0 +1,87 @@ +//using System.Threading; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using NUnit.Framework; +using SplashScreen = Core.Common.Gui.Forms.SplashScreen.SplashScreen; +//using Application = System.Windows.Forms.Application; + +namespace Core.Common.Gui.Tests.Forms +{ + [TestFixture] + public class SplashScreenTest + { + [Test] + [RequiresSTA] + public void TestFillsLabelsViaProperties() + { + var strCompany = "Cmp1"; + var strCopyright = "Copy1"; + var strLicense = "License1"; + var strVersion = "Version1"; + var strProgressText = "SomeProgress1"; + + var screen = new SplashScreen + { + CompanyText = strCompany, + CopyrightText = strCopyright, + LicenseText = strLicense, + VersionText = strVersion, + ProgressText = strProgressText + }; + + screen.Show(); + + Assert.AreEqual(strVersion, GetLabelText(screen, "labelVersion")); + Assert.AreEqual(strCompany, GetLabelText(screen, "labelCompany")); + Assert.AreEqual(strLicense, GetLabelText(screen, "labelLicense")); + Assert.AreEqual(strCopyright, GetLabelText(screen, "labelCopyright")); + Assert.AreEqual(strProgressText, GetLabelText(screen, "labelProgressMessage")); + } + + /* + [Test] + [RequiresSTA] + public void TestProgressBarFillsUp() + { + var screen = new SplashScreen(); + + screen.Show(); + var counter = 0; + // screen.ContentRendered += (sender, args) => counter++; + + for (var i = 0; i <= 99; i++) + { + screen.ProgressValuePercent = i; + Thread.Sleep(20); + Application.DoEvents(); + } + +// Assert.AreEqual(100, counter); + } + */ + private FrameworkElement FindControlRecursively(FrameworkElement parent, string name) + { + var childrenCount = VisualTreeHelper.GetChildrenCount(parent); + FrameworkElement foundChild = null; + for (var childIndex = 0; childIndex < childrenCount; childIndex++) + { + var child = VisualTreeHelper.GetChild(parent, childIndex) as FrameworkElement; + foundChild = child.Name == name ? child : FindControlRecursively(child, name); + + if (foundChild != null) + { + break; + } + } + + return foundChild; + } + + private string GetLabelText(FrameworkElement parent, string labelName) + { + var label = FindControlRecursively(parent, labelName); + return (label as Label).Content.ToString(); + } + } +} \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/Properties/AssemblyInfo.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Gui.Test/Properties/AssemblyInfo.cs (revision 0) +++ Core/Common/test/Core.Common.Gui.Test/Properties/AssemblyInfo.cs (revision cbb3c7e4f06665f1fc399e839bd0f370f8f13278) @@ -0,0 +1,31 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Core.Common.Gui.Tests")] +[assembly: AssemblyProduct("Core.Common.Gui.Tests")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5fe7ae89-1597-4bd0-a9f7-7efa9c9f3965")] + + + + + +/* + * +[assembly: AssemblyTitle("Core.Common.Base.Tests")] +[assembly: AssemblyProduct("Core.Common.Base.Tests")] + +[assembly: ComVisible(false)] +[assembly: Guid("2eaa90e8-ad27-4130-919b-4a043f2526cb")] +[assembly: RequiresSTA] + * */ Fisheye: Tag cbb3c7e4f06665f1fc399e839bd0f370f8f13278 refers to a dead (removed) revision in file `Core/Common/test/SplashScreenTest/Core.Common.Gui.Tests.csproj'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag cbb3c7e4f06665f1fc399e839bd0f370f8f13278 refers to a dead (removed) revision in file `Core/Common/test/SplashScreenTest/Forms/SplashScreenTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag cbb3c7e4f06665f1fc399e839bd0f370f8f13278 refers to a dead (removed) revision in file `Core/Common/test/SplashScreenTest/Properties/AssemblyInfo.cs'. Fisheye: No comparison available. Pass `N' to diff?