Пример #1
0
        public void EnsureAppendUriPathThrowsExceptionForNoUserId()
        {
            var           cmd = new GetUserTopArtistsCommand();
            StringBuilder sb  = new StringBuilder();

            cmd.AppendUriPath(sb);
        }
        public void EnsureStockPropertiesAreCorrect()
        {
            var cmd = new GetUserTopArtistsCommand();

            Assert.AreEqual(false, cmd.RequiresCountryCode, "Expected the right value");
            Assert.AreEqual(HttpMethod.Get, cmd.HttpMethod, "Expected the right value");
            
            StringBuilder sb = new StringBuilder();
            cmd.UserId = "USERID";
            cmd.AppendUriPath(sb);
            Assert.AreEqual("users/USERID/history/creators/", sb.ToString(), "Expected the right value");
        }
Пример #3
0
        public void EnsureStockPropertiesAreCorrect()
        {
            var cmd = new GetUserTopArtistsCommand();

            Assert.AreEqual(false, cmd.RequiresCountryCode, "Expected the right value");
            Assert.AreEqual(HttpMethod.Get, cmd.HttpMethod, "Expected the right value");

            StringBuilder sb = new StringBuilder();

            cmd.UserId = "USERID";
            cmd.AppendUriPath(sb);
            Assert.AreEqual("users/USERID/history/creators/", sb.ToString(), "Expected the right value");
        }
 public void EnsureAppendUriPathThrowsExceptionForNoUserId()
 {
     var cmd = new GetUserTopArtistsCommand();
     StringBuilder sb = new StringBuilder();
     cmd.AppendUriPath(sb);
 }