Esempio n. 1
0
        public void UpdateRepositoryItem()
        {
            //Arrange
            NewRepositorySerializer RepositorySerializer = new NewRepositorySerializer();
            MyRepositoryItem        MRI2 = (from x in mSolutionRepository.GetAllRepositoryItems <MyRepositoryItem>() where x.Name == "A2" select x).FirstOrDefault();

            //Act
            MRI2.Name = "A2 New Name";
            mSolutionRepository.SaveRepositoryItem(MRI2);
            MyRepositoryItem MRI2FromDisk = (MyRepositoryItem)RepositorySerializer.DeserializeFromFile(MRI2.FilePath);


            //Assert
            Assert.AreEqual(MRI2.Guid, MRI2FromDisk.Guid);
            Assert.AreEqual(MRI2.Name, MRI2FromDisk.Name);
        }