public void CheckRequiredFields_JustTypNotNull_False()
        {
            //arrange
            List <string> list = new List <string>();
            var           sut  = new AddingClass();

            list.Add("he");
            //act
            var result = sut.CheckRequiredFields(null, list, null);

            //assert
            Assert.False(result);
        }
        public void CheckRequiredFields_JustValutadatumNotNull_False()
        {
            //arrange
            List <string> list = new List <string>();
            var           sut  = new AddingClass();

            list.Add("he");
            //act
            var result = sut.CheckRequiredFields(null, null, DateTime.Now);

            //assert
            Assert.False(result);
        }
        public void CheckRequiredFields_AllFieldsNull_True()
        {
            //arrange
            var           sut  = new AddingClass();
            List <string> list = new List <string>();

            list.Add("HE");
            //act
            var result = sut.CheckRequiredFields("He", list, DateTime.Now);

            //assert
            Assert.True(result);
        }
        private void OnCmdSpeichern()
        {
            AddingClass adden = new AddingClass();

            _Guid = Guid.NewGuid();
            guid  = _Guid.ToString();


            // TODO: Add your Code here
            if (adden.CheckRequiredFields(Bezeichnung, TypItems, ValutaDatum))
            {
                MetadataItem  mdi      = adden.createMetadataItem(Benutzer, Bezeichnung, Stichwoerter, Erfassungsdatum, _filePath, IsRemoveFileEnabled, SelectedTypItem, ValutaDatum, _Guid);
                FileMove      filemove = new FileMove();
                SafingService safe     = new SafingService();
                safe.SafeFile(filemove, mdi);
            }



            _navigateBack();
        }