コード例 #1
0
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetSpartanImage();

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{null}/spartan{null}", uri);
        }
コード例 #2
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetSpartanImage();

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{null}/spartan{null}", uri);
        }
コード例 #3
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetSpartanImage();

            var uri = query.GetConstructedUri();

            Assert.AreEqual(string.Format(BaseUri, null, null), uri);
        }
コード例 #4
0
        public void GetConstructedUri_Crop_MatchesExpected(Enumeration.CropType cropType)
        {
            var query = new GetSpartanImage()
                        .Crop(cropType);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{null}/spartan?crop={cropType}", uri);
        }
コード例 #5
0
        public void GetConstructedUri_Size_MatchesExpected(int size)
        {
            var query = new GetSpartanImage()
                        .Size(size);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{null}/spartan?size={size}", uri);
        }
コード例 #6
0
        public void GetConstructedUri_ForPlayer_MatchesExpected(string gamertag)
        {
            var query = new GetSpartanImage()
                        .ForPlayer(gamertag);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{gamertag}/spartan{null}", uri);
        }
コード例 #7
0
        public void GetConstructedUri_Crop_MatchesExpected(Enumeration.CropType cropType)
        {
            var query = new GetSpartanImage()
                .Crop(cropType);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{null}/spartan?crop={cropType}", uri);
        }
コード例 #8
0
        public void GetConstructedUri_Size_MatchesExpected(int size)
        {
            var query = new GetSpartanImage()
                .Size(size);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{null}/spartan?size={size}", uri);
        }
コード例 #9
0
        public void GetConstructedUri_ForPlayer_MatchesExpected(string gamertag)
        {
            var query = new GetSpartanImage()
                .ForPlayer(gamertag);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{gamertag}/spartan{null}", uri);
        }
コード例 #10
0
        public void GetConstructedUri_Crop_MatchesExpected(Enumeration.CropType cropType)
        {
            var query = new GetSpartanImage()
                .Crop(cropType);

            var uri = query.GetConstructedUri();

            Assert.AreEqual(string.Format(BaseUri, null, $"?crop={cropType}"), uri);
        }
コード例 #11
0
        public void GetConstructedUri_Size_MatchesExpected(int size)
        {
            var query = new GetSpartanImage()
                .Size(size);

            var uri = query.GetConstructedUri();

            Assert.AreEqual(string.Format(BaseUri, null, $"?size={size}"), uri);
        }
コード例 #12
0
        public void GetConstructedUri_ForPlayer_MatchesExpected(string gamertag)
        {
            var query = new GetSpartanImage()
                .ForPlayer(gamertag);

            var uri = query.GetConstructedUri();

            Assert.AreEqual(string.Format(BaseUri, gamertag, null), uri);
        }
コード例 #13
0
        public void GetConstructedUri_Complex_MatchesExpected(string gamertag, int size, Enumeration.CropType cropType)
        {
            var query = new GetSpartanImage()
                        .ForPlayer(gamertag)
                        .Size(size)
                        .Crop(cropType);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{gamertag}/spartan?size={size}&crop={cropType}", uri);
        }
コード例 #14
0
        public void GetConstructedUri_Complex_MatchesExpected(string gamertag, int size, Enumeration.CropType cropType)
        {
            var query = new GetSpartanImage()
                .ForPlayer(gamertag)
                .Size(size)
                .Crop(cropType);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"profile/h5/profiles/{gamertag}/spartan?size={size}&crop={cropType}", uri);
        }
コード例 #15
0
        public void GetConstructedUri_Complex_MatchesExpected(string gamertag, int size, Enumeration.CropType cropType)
        {
            var query = new GetSpartanImage()
                .ForPlayer(gamertag)
                .Size(size)
                .Crop(cropType);

            var uri = query.GetConstructedUri();

            Assert.AreEqual(string.Format(BaseUri, gamertag, $"?size={size}&crop={cropType}"), uri);
        }