Exemplo n.º 1
0
        public void License_Fires_Property_Changed()
        {
            var license = new License();

            license.AssertThatAllProperties()
                   .RaiseChangeNotification();
        }
        public void RemoveSelected_Removes_UserData_From_License()
        {
            var viewModel = new UserDataViewModel();
            var license = new License();
            var data = new UserData();

            license.Data.Add(data);
            viewModel.CurrentLicense = license;
            viewModel.SelectedKeyValue = data;

            viewModel.RemoveSelected();

            Assert.DoesNotContain(data, viewModel.CurrentLicense.Data);
        }
        public void AddKey_Adds_To_Licese_UserData()
        {
            var viewModel = new UserDataViewModel();
            var license = new License();

            viewModel.CurrentLicense = license;
            viewModel.CurrentKey = "UserKey";
            viewModel.CurrentValue = "UserValue";
            
            viewModel.AddKey();

            var data = viewModel.CurrentLicense.Data[0];

            Assert.Equal("UserKey", data.Key);
            Assert.Equal("UserValue", data.Value);
        }