AppActs.Client.Repository.SqlServer.MSTest.ApplicationRepositoryIntegration.Update_By_Guid C# (CSharp) Method

Update_By_Guid() private method

private Update_By_Guid ( ) : void
return void
        public void Update_By_Guid()
        {
            IApplicationRepository applicationRepository = new ApplicationRepository(this.Client, this.Database);

            Application application = new Application(Guid.NewGuid().ToString());
            applicationRepository.Save(application);

            Application applicationLoad = applicationRepository.Find(application.Guid);

            applicationLoad.Active = false;
            applicationLoad.DateModified = DateTime.Now;
            applicationLoad.Name = Guid.NewGuid().ToString();

            applicationRepository.Update(applicationLoad);

            Application applicationUpdated = applicationRepository.Find(application.Guid);

            Assert.IsTrue(applicationUpdated.Active == applicationLoad.Active);
            Assert.IsTrue(applicationUpdated.Name == applicationLoad.Name);
        }