コード例 #1
0
        public void LoadByGuid()
        {
            IPlatformRepository iPlatformDAL = new PlatformRepository(this.Client, this.Database);

            IEnumerable <Platform> platforms = iPlatformDAL.FindAll();

            foreach (Platform platform in platforms)
            {
                Platform platformToCheck = iPlatformDAL.Find(platform.Guid);
                Assert.IsTrue(platformToCheck.Id > 0);
                Assert.IsNotNull(platformToCheck.Name);
            }
        }
コード例 #2
0
        public void LoadByGuid()
        {
            IPlatformRepository iPlatformDAL = new PlatformRepository(this.Client, this.Database);

            IEnumerable<Platform> platforms = iPlatformDAL.FindAll();

            foreach (Platform platform in platforms)
            {
                Platform platformToCheck = iPlatformDAL.Find(platform.Guid);
                Assert.IsTrue(platformToCheck.Id > 0);
                Assert.IsNotNull(platformToCheck.Name);
            }
        }
コード例 #3
0
        public void GetPlatformSDK()
        {
            IPlatformRepository iPlatformDAL = new PlatformRepository(this.Client, this.Database);

            IEnumerable <Platform> platforms = iPlatformDAL.FindAll();

            foreach (Platform platform in platforms)
            {
                Platform platformSDK = iPlatformDAL.Find(platform.Id);
                Assert.IsTrue(platformSDK.Id > 0);
                Assert.IsNotNull(platformSDK.Name);
                Assert.IsNotNull(platformSDK.Url);
                Assert.IsNotNull(platformSDK.UrlTitle);
            }
        }
コード例 #4
0
        public void GetPlatformSDK()
        {
            IPlatformRepository iPlatformDAL = new PlatformRepository(this.Client, this.Database);

            IEnumerable<Platform> platforms = iPlatformDAL.FindAll();

            foreach (Platform platform in platforms)
            {
                Platform platformSDK = iPlatformDAL.Find(platform.Id);
                Assert.IsTrue(platformSDK.Id > 0);
                Assert.IsNotNull(platformSDK.Name);
                Assert.IsNotNull(platformSDK.Url);
                Assert.IsNotNull(platformSDK.UrlTitle);
            }
        }
        public void Save_Platforms_Against_An_Application()
        {
            IApplicationRepository applicationRepository = new ApplicationRepository(this.Client, this.Database);
            IPlatformRepository    iPlatformDAL          = new PlatformRepository(this.Client, this.Database);

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

            application.Platforms = iPlatformDAL.FindAll().ToList();
            applicationRepository.Save(application);

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

            Assert.IsNotNull(applicationFound.Platforms);
            Assert.IsTrue(applicationFound.Platforms.Count == application.Platforms.Count);
        }
        public void Remove_Platforms_From_Application()
        {
            IApplicationRepository applicationRepository = new ApplicationRepository(this.Client, this.Database);
            IPlatformRepository iPlatformDAL = new PlatformRepository(this.Client, this.Database);

            Application application = new Application(Guid.NewGuid().ToString());
            application.Platforms = iPlatformDAL.FindAll().ToList();
            applicationRepository.Save(application);

            Application applicationFound = applicationRepository.Find(application.Guid);
            applicationFound.Platforms = new List<Platform>();
            applicationRepository.Update(application);

            Application applicationRemovedPlatforms = applicationRepository.Find(application.Guid);
            Assert.IsTrue(applicationRemovedPlatforms.Platforms.Count == 0);
        }
        public void Remove_Platforms_From_Application()
        {
            IApplicationRepository applicationRepository = new ApplicationRepository(this.Client, this.Database);
            IPlatformRepository    iPlatformDAL          = new PlatformRepository(this.Client, this.Database);

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

            application.Platforms = iPlatformDAL.FindAll().ToList();
            applicationRepository.Save(application);

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

            applicationFound.Platforms = new List <Platform>();
            applicationRepository.Update(applicationFound);

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

            Assert.IsTrue(applicationRemovedPlatforms.Platforms.Count == 0);
        }
        public void Save_Platforms_Against_An_Application()
        {
            IApplicationRepository applicationRepository = new ApplicationRepository(this.Client, this.Database);
            IPlatformRepository iPlatformDAL = new PlatformRepository(this.Client, this.Database);

            Application application = new Application(Guid.NewGuid().ToString());
            application.Platforms = iPlatformDAL.FindAll().ToList();
            applicationRepository.Save(application);

            Application applicationFound = applicationRepository.Find(application.Guid);
            Assert.IsNotNull(applicationFound.Platforms);
            Assert.IsTrue(applicationFound.Platforms.Count == application.Platforms.Count);
        }
コード例 #9
0
        public void Load()
        {
            IPlatformRepository iPlatformDAL = new PlatformRepository(this.Client, this.Database);

            Assert.IsTrue(iPlatformDAL.FindAll().Count() > 0);
        }
コード例 #10
0
        public void Load()
        {
            IPlatformRepository iPlatformDAL = new PlatformRepository(this.Client, this.Database);

            Assert.IsTrue(iPlatformDAL.FindAll().Count() > 0);
        }