コード例 #1
0
        public void EnsureBlankTerritoryCommandsDoNotIncludeTerritory()
        {
            MockBlankTerritoryCommand cmd = new MockBlankTerritoryCommand();
            IMusicClientSettings settings = new MockMusicClientSettings("test", "country", null);

            IApiUriBuilder builder = new ApiUriBuilder();
            Uri uri = builder.BuildUri(cmd, settings, null);

            Assert.IsTrue(uri.ToString().Contains("/-/"), "Expected the country code to be '-'");
            Assert.IsFalse(uri.ToString().Contains("country"), "Expected the country code not to be included in the URI");
        }
コード例 #2
0
        public void EnsureBlankTerritoryCommandsDoNotIncludeTerritory()
        {
            MockBlankTerritoryCommand cmd      = new MockBlankTerritoryCommand();
            IMusicClientSettings      settings = new MockMusicClientSettings("test", "country", null);

            IApiUriBuilder builder = new ApiUriBuilder();
            Uri            uri     = builder.BuildUri(cmd, settings, null);

            Assert.IsTrue(uri.ToString().Contains("/-/"), "Expected the country code to be '-'");
            Assert.IsFalse(uri.ToString().Contains("country"), "Expected the country code not to be included in the URI");
        }