Index: Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml
===================================================================
diff -u -r8facffc48a20cd49759e32aea1ecc100047c68a2 -rc2ea25a7c137c0b98a51734ca53674ddabb5164f
--- Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml (.../SplashScreen.xaml) (revision 8facffc48a20cd49759e32aea1ecc100047c68a2)
+++ Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml (.../SplashScreen.xaml) (revision c2ea25a7c137c0b98a51734ca53674ddabb5164f)
@@ -16,7 +16,7 @@
-
+
@@ -25,7 +25,7 @@
-
+
Index: Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml.cs
===================================================================
diff -u -r8facffc48a20cd49759e32aea1ecc100047c68a2 -rc2ea25a7c137c0b98a51734ca53674ddabb5164f
--- Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml.cs (.../SplashScreen.xaml.cs) (revision 8facffc48a20cd49759e32aea1ecc100047c68a2)
+++ Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml.cs (.../SplashScreen.xaml.cs) (revision c2ea25a7c137c0b98a51734ca53674ddabb5164f)
@@ -241,7 +241,7 @@
private void SetSupportValues()
{
- var supportVisibility = !(String.IsNullOrWhiteSpace(SupportPhoneNumber) && String.IsNullOrWhiteSpace(SupportEmail)) ? Visibility.Visible : Visibility.Collapsed;
+ var supportVisibility = (String.IsNullOrWhiteSpace(SupportPhoneNumber) || String.IsNullOrWhiteSpace(SupportEmail)) ? Visibility.Collapsed : Visibility.Visible;
LabelSupportTitle.Visibility = supportVisibility;
LabelSupportPhoneNumberTitle.Visibility = supportVisibility;
Index: Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreen/SplashScreenTest.cs
===================================================================
diff -u -r8facffc48a20cd49759e32aea1ecc100047c68a2 -rc2ea25a7c137c0b98a51734ca53674ddabb5164f
--- Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreen/SplashScreenTest.cs (.../SplashScreenTest.cs) (revision 8facffc48a20cd49759e32aea1ecc100047c68a2)
+++ Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreen/SplashScreenTest.cs (.../SplashScreenTest.cs) (revision c2ea25a7c137c0b98a51734ca53674ddabb5164f)
@@ -64,14 +64,18 @@
}
[Test]
- [TestCase(true)]
- [TestCase(false)]
+ [TestCase(true, true, true)]
+ [TestCase(true, false, false)]
+ [TestCase(false, true, false)]
+ [TestCase(false, false, false)]
[RequiresSTA]
- public void ViewPropertiesVisibility_SupportValuesSet_SupportValuesShouldBeVisible(bool supportVisible)
+ public void ViewPropertiesVisibility_SupportValuesSet_SupportValuesShouldBeVisible(
+ bool emailVisible, bool phoneVisible,
+ bool supportUiElementsShouldBeVisible)
{
// Setup
- var supportEmail = supportVisible ? "" : string.Empty;
- var supportPhone = supportVisible ? "" : string.Empty;
+ var supportEmail = emailVisible ? "" : string.Empty;
+ var supportPhone = phoneVisible ? "" : string.Empty;
// Call
var screen = new Gui.Forms.SplashScreen.SplashScreen
@@ -82,11 +86,11 @@
screen.Show();
// Assert
- Assert.AreEqual(supportVisible, GetIsControlVisible(screen, "LabelSupportTitle"));
- Assert.AreEqual(supportVisible, GetIsControlVisible(screen, "LabelSupportPhoneNumberTitle"));
- Assert.AreEqual(supportVisible, GetIsControlVisible(screen, "LabelSupportPhoneNumber"));
- Assert.AreEqual(supportVisible, GetIsControlVisible(screen, "LabelSupportEmailAddressTitle"));
- Assert.AreEqual(supportVisible, GetIsControlVisible(screen, "LabelSupportEmailAddress"));
+ Assert.AreEqual(supportUiElementsShouldBeVisible, GetIsControlVisible(screen, "LabelSupportTitle"));
+ Assert.AreEqual(supportUiElementsShouldBeVisible, GetIsControlVisible(screen, "LabelSupportPhoneNumberTitle"));
+ Assert.AreEqual(supportUiElementsShouldBeVisible, GetIsControlVisible(screen, "LabelSupportPhoneNumber"));
+ Assert.AreEqual(supportUiElementsShouldBeVisible, GetIsControlVisible(screen, "LabelSupportEmailAddressTitle"));
+ Assert.AreEqual(supportUiElementsShouldBeVisible, GetIsControlVisible(screen, "LabelSupportEmailAddress"));
// Teardown
screen.Close();