From d050ac1d53239bdb42a1c52db7b0daa2187dba7c Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Wed, 15 Feb 2017 10:09:27 +0100 Subject: Limited event's name to 20 characters, updated use cases and added unit test project for future use. --- EventMaker/Design/AddEventFDUC.txt | 4 +- EventMaker/Design/EditEventFDUC.txt | 4 +- EventMaker/EventMaker.sln | 22 ++++ EventMaker/EventMaker/View/CreateEventPage.xaml | 5 +- EventMaker/EventMaker/View/EditEventPage.xaml | 5 +- EventMaker/EventMaker/View/EventItem.xaml | 10 +- .../UnitTests/Assets/LockScreenLogo.scale-200.png | Bin 0 -> 1430 bytes .../UnitTests/Assets/SplashScreen.scale-200.png | Bin 0 -> 7700 bytes .../Assets/Square150x150Logo.scale-200.png | Bin 0 -> 2937 bytes .../UnitTests/Assets/Square44x44Logo.scale-200.png | Bin 0 -> 1647 bytes ...are44x44Logo.targetsize-24_altform-unplated.png | Bin 0 -> 1255 bytes EventMaker/UnitTests/Assets/StoreLogo.png | Bin 0 -> 1451 bytes .../UnitTests/Assets/Wide310x150Logo.scale-200.png | Bin 0 -> 3204 bytes EventMaker/UnitTests/Package.appxmanifest | 45 +++++++ EventMaker/UnitTests/Properties/AssemblyInfo.cs | 30 +++++ EventMaker/UnitTests/Properties/UnitTestApp.rd.xml | 29 +++++ EventMaker/UnitTests/UnitTest.cs | 14 ++ EventMaker/UnitTests/UnitTestApp.xaml | 8 ++ EventMaker/UnitTests/UnitTestApp.xaml.cs | 102 +++++++++++++++ EventMaker/UnitTests/UnitTests.csproj | 141 +++++++++++++++++++++ EventMaker/UnitTests/project.json | 16 +++ 21 files changed, 425 insertions(+), 10 deletions(-) create mode 100644 EventMaker/UnitTests/Assets/LockScreenLogo.scale-200.png create mode 100644 EventMaker/UnitTests/Assets/SplashScreen.scale-200.png create mode 100644 EventMaker/UnitTests/Assets/Square150x150Logo.scale-200.png create mode 100644 EventMaker/UnitTests/Assets/Square44x44Logo.scale-200.png create mode 100644 EventMaker/UnitTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png create mode 100644 EventMaker/UnitTests/Assets/StoreLogo.png create mode 100644 EventMaker/UnitTests/Assets/Wide310x150Logo.scale-200.png create mode 100644 EventMaker/UnitTests/Package.appxmanifest create mode 100644 EventMaker/UnitTests/Properties/AssemblyInfo.cs create mode 100644 EventMaker/UnitTests/Properties/UnitTestApp.rd.xml create mode 100644 EventMaker/UnitTests/UnitTest.cs create mode 100644 EventMaker/UnitTests/UnitTestApp.xaml create mode 100644 EventMaker/UnitTests/UnitTestApp.xaml.cs create mode 100644 EventMaker/UnitTests/UnitTests.csproj create mode 100644 EventMaker/UnitTests/project.json diff --git a/EventMaker/Design/AddEventFDUC.txt b/EventMaker/Design/AddEventFDUC.txt index 3fd4e82..370e19f 100644 --- a/EventMaker/Design/AddEventFDUC.txt +++ b/EventMaker/Design/AddEventFDUC.txt @@ -6,7 +6,9 @@ Stakeholders and Interests: Teachers, adding events functionality Preconditions: App started successfuly Success Guarantee: New event on the list Main Success Scenario: User opens app, presses add button, fills all fields on the page for creating new event and saves the event. -Extensions: User opens app, presses add button but then he changes mind and presses the back button to return to the main page. +Extensions: +A. User opens app, presses add button but then he changes mind and presses the back button to return to the main page. +B. The name of event can't be longer than 20 characters. Special Requirements: UWP app, serialization to JSON Technology and Data Variations List: None Frequency of Occurence: Based on the will of the user diff --git a/EventMaker/Design/EditEventFDUC.txt b/EventMaker/Design/EditEventFDUC.txt index 7466fa1..19428eb 100644 --- a/EventMaker/Design/EditEventFDUC.txt +++ b/EventMaker/Design/EditEventFDUC.txt @@ -6,7 +6,9 @@ Stakeholders and Interests: Marcin Zelent, extra functionality Preconditions: App started successfuly, there is at least one event on the list Success Guarantee: Previously created event's information changed Main Success Scenario: User opens app, presses edit button on the chosen event, changes information on the edit page and saves the event. -Extensions: User opens app, presses edit button on the chosen event but then he changes mind and presses the back button to return to the main page. +Extensions: +A. User opens app, presses edit button on the chosen event but then he changes mind and presses the back button to return to the main page. +B. The name of event can't be longer than 20 characters. Special Requirements: UWP app, serialization to JSON Technology and Data Variations List: None Frequency of Occurence: Based on the will of the user diff --git a/EventMaker/EventMaker.sln b/EventMaker/EventMaker.sln index a0cd6cf..a2cc874 100644 --- a/EventMaker/EventMaker.sln +++ b/EventMaker/EventMaker.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventMaker", "EventMaker\Ev EndProject Project("{F088123C-0E9E-452A-89E6-6BA2F21D5CAC}") = "Design", "Design\Design.modelproj", "{06579846-FD65-4599-9302-B88698E6511E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{7CA8C0B4-C88F-489B-BF77-E17B45B2C375}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +57,26 @@ Global {06579846-FD65-4599-9302-B88698E6511E}.Release|x64.Build.0 = Release|Any CPU {06579846-FD65-4599-9302-B88698E6511E}.Release|x86.ActiveCfg = Release|Any CPU {06579846-FD65-4599-9302-B88698E6511E}.Release|x86.Build.0 = Release|Any CPU + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|Any CPU.ActiveCfg = Debug|x86 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|ARM.ActiveCfg = Debug|ARM + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|ARM.Build.0 = Debug|ARM + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|ARM.Deploy.0 = Debug|ARM + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|x64.ActiveCfg = Debug|x64 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|x64.Build.0 = Debug|x64 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|x64.Deploy.0 = Debug|x64 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|x86.ActiveCfg = Debug|x86 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|x86.Build.0 = Debug|x86 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Debug|x86.Deploy.0 = Debug|x86 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|Any CPU.ActiveCfg = Release|x86 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|ARM.ActiveCfg = Release|ARM + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|ARM.Build.0 = Release|ARM + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|ARM.Deploy.0 = Release|ARM + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|x64.ActiveCfg = Release|x64 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|x64.Build.0 = Release|x64 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|x64.Deploy.0 = Release|x64 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|x86.ActiveCfg = Release|x86 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|x86.Build.0 = Release|x86 + {7CA8C0B4-C88F-489B-BF77-E17B45B2C375}.Release|x86.Deploy.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/EventMaker/EventMaker/View/CreateEventPage.xaml b/EventMaker/EventMaker/View/CreateEventPage.xaml index c5eb2ab..e736e9e 100644 --- a/EventMaker/EventMaker/View/CreateEventPage.xaml +++ b/EventMaker/EventMaker/View/CreateEventPage.xaml @@ -21,7 +21,10 @@ VerticalAlignment="Center" FontSize="50" Text="Add Event" /> - + - + - - + d:DesignWidth="400" + mc:Ignorable="d"> - + diff --git a/EventMaker/UnitTests/Assets/LockScreenLogo.scale-200.png b/EventMaker/UnitTests/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000..735f57a Binary files /dev/null and b/EventMaker/UnitTests/Assets/LockScreenLogo.scale-200.png differ diff --git a/EventMaker/UnitTests/Assets/SplashScreen.scale-200.png b/EventMaker/UnitTests/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000..023e7f1 Binary files /dev/null and b/EventMaker/UnitTests/Assets/SplashScreen.scale-200.png differ diff --git a/EventMaker/UnitTests/Assets/Square150x150Logo.scale-200.png b/EventMaker/UnitTests/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000..af49fec Binary files /dev/null and b/EventMaker/UnitTests/Assets/Square150x150Logo.scale-200.png differ diff --git a/EventMaker/UnitTests/Assets/Square44x44Logo.scale-200.png b/EventMaker/UnitTests/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000..ce342a2 Binary files /dev/null and b/EventMaker/UnitTests/Assets/Square44x44Logo.scale-200.png differ diff --git a/EventMaker/UnitTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/EventMaker/UnitTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000..f6c02ce Binary files /dev/null and b/EventMaker/UnitTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/EventMaker/UnitTests/Assets/StoreLogo.png b/EventMaker/UnitTests/Assets/StoreLogo.png new file mode 100644 index 0000000..7385b56 Binary files /dev/null and b/EventMaker/UnitTests/Assets/StoreLogo.png differ diff --git a/EventMaker/UnitTests/Assets/Wide310x150Logo.scale-200.png b/EventMaker/UnitTests/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000..288995b Binary files /dev/null and b/EventMaker/UnitTests/Assets/Wide310x150Logo.scale-200.png differ diff --git a/EventMaker/UnitTests/Package.appxmanifest b/EventMaker/UnitTests/Package.appxmanifest new file mode 100644 index 0000000..656f783 --- /dev/null +++ b/EventMaker/UnitTests/Package.appxmanifest @@ -0,0 +1,45 @@ + + + + + + + + + UnitTests + Marcin + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EventMaker/UnitTests/Properties/AssemblyInfo.cs b/EventMaker/UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f035505 --- /dev/null +++ b/EventMaker/UnitTests/Properties/AssemblyInfo.cs @@ -0,0 +1,30 @@ +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("UnitTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("UnitTests")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: AssemblyMetadata("TargetPlatform","UAP")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] \ No newline at end of file diff --git a/EventMaker/UnitTests/Properties/UnitTestApp.rd.xml b/EventMaker/UnitTests/Properties/UnitTestApp.rd.xml new file mode 100644 index 0000000..efee59d --- /dev/null +++ b/EventMaker/UnitTests/Properties/UnitTestApp.rd.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/EventMaker/UnitTests/UnitTest.cs b/EventMaker/UnitTests/UnitTest.cs new file mode 100644 index 0000000..a8be37c --- /dev/null +++ b/EventMaker/UnitTests/UnitTest.cs @@ -0,0 +1,14 @@ +using System; +using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; + +namespace UnitTests +{ + [TestClass] + public class UnitTest1 + { + [TestMethod] + public void TestMethod1() + { + } + } +} diff --git a/EventMaker/UnitTests/UnitTestApp.xaml b/EventMaker/UnitTests/UnitTestApp.xaml new file mode 100644 index 0000000..4e8221b --- /dev/null +++ b/EventMaker/UnitTests/UnitTestApp.xaml @@ -0,0 +1,8 @@ + + + diff --git a/EventMaker/UnitTests/UnitTestApp.xaml.cs b/EventMaker/UnitTests/UnitTestApp.xaml.cs new file mode 100644 index 0000000..a119d71 --- /dev/null +++ b/EventMaker/UnitTests/UnitTestApp.xaml.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +namespace UnitTests +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + sealed partial class App : Application + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + this.Suspending += OnSuspending; + } + + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used such as when the application is launched to open a specific file. + /// + /// Details about the launch request and process. + protected override void OnLaunched(LaunchActivatedEventArgs e) + { + +#if DEBUG + if (System.Diagnostics.Debugger.IsAttached) + { + this.DebugSettings.EnableFrameRateCounter = true; + } +#endif + + Frame rootFrame = Window.Current.Content as Frame; + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (rootFrame == null) + { + // Create a Frame to act as the navigation context and navigate to the first page + rootFrame = new Frame(); + + rootFrame.NavigationFailed += OnNavigationFailed; + + if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) + { + //TODO: Load state from previously suspended application + } + + // Place the frame in the current Window + Window.Current.Content = rootFrame; + } + + Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI(); + + // Ensure the current window is active + Window.Current.Activate(); + + Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.Run(e.Arguments); + } + + /// + /// Invoked when Navigation to a certain page fails + /// + /// The Frame which failed navigation + /// Details about the navigation failure + void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + } + + /// + /// Invoked when application execution is being suspended. Application state is saved + /// without knowing whether the application will be terminated or resumed with the contents + /// of memory still intact. + /// + /// The source of the suspend request. + /// Details about the suspend request. + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + //TODO: Save application state and stop any background activity + deferral.Complete(); + } + } +} diff --git a/EventMaker/UnitTests/UnitTests.csproj b/EventMaker/UnitTests/UnitTests.csproj new file mode 100644 index 0000000..e2209fd --- /dev/null +++ b/EventMaker/UnitTests/UnitTests.csproj @@ -0,0 +1,141 @@ + + + + + Debug + x86 + {7ca8c0b4-c88f-489b-bf77-e17b45b2c375} + AppContainerExe + Properties + UnitTests + UnitTests + en-US + UAP + 10.0.14393.0 + 10.0.10586.0 + 14 + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + UnitTests_TemporaryKey.pfx + + 14.0 + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x86 + false + prompt + true + true + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM + false + prompt + true + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x64 + false + prompt + true + true + + + + + + + + + + + UnitTestApp.xaml + + + + + + MSBuild:Compile + Designer + + + + + Designer + + + + + + + + + + + + + + + + + 14.0 + + + + diff --git a/EventMaker/UnitTests/project.json b/EventMaker/UnitTests/project.json new file mode 100644 index 0000000..92d1456 --- /dev/null +++ b/EventMaker/UnitTests/project.json @@ -0,0 +1,16 @@ +{ + "dependencies": { + "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0" + }, + "frameworks": { + "uap10.0": {} + }, + "runtimes": { + "win10-arm": {}, + "win10-arm-aot": {}, + "win10-x86": {}, + "win10-x86-aot": {}, + "win10-x64": {}, + "win10-x64-aot": {} + } +} \ No newline at end of file -- cgit v1.2.3