public void TestPreventSelectionDuringCreation()
        {
            var Service   = new LibraryAdminService("http://localhost:8080");
            var ViewModel = new CustomerViewModel(Service);

            ViewModel.LoadCustomers();
            Customer OldCustomer = ViewModel.AllCustomers[0];

            ViewModel.NewCustomer();
            Customer NewCustomer = ViewModel.CustomerInEditor;

            ViewModel.EditorName       = "test";
            ViewModel.CustomerInEditor = OldCustomer;

            Assert.AreEqual(ViewModel.CustomerInEditor, NewCustomer);
        }
        public void TestPreventResetAfterCreationWhenHasUnsavedChanges()
        {
            var Service   = new LibraryAdminService("http://localhost:8080");
            var ViewModel = new CustomerViewModel(Service);

            ViewModel.LoadCustomers();
            Customer CustomerA = ViewModel.AllCustomers[0];

            ViewModel.CustomerInEditor = CustomerA;
            var TEST_NAME = "test";

            ViewModel.EditorName = TEST_NAME;
            ViewModel.NewCustomer();

            Assert.AreEqual(ViewModel.CustomerInEditor, CustomerA);
            Assert.AreEqual(ViewModel.EditorName, TEST_NAME);
        }