GetOneCard() публичный Метод

Returns the card for cardNo
public GetOneCard ( int cardNo ) : Card
cardNo int
Результат Card
 public void TestCardDescription()
 {
     var model = new ViewModel(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD);
     model.SelectProject("test");
     var card = model.GetOneCard(126);
     Assert.AreEqual("ready to test", card.Description);
     card.AddCardAttributeFilterToPostData("description", "xxx");
     card.Update();
     var card2 = model.GetOneCard(126);
     Assert.AreEqual("xxx", card2.Description);
     card.AddCardAttributeFilterToPostData("description", "ready to test");
     card.Update();
 }
 public void TransitionsIntegrationTest()
 {
     Assert.AreEqual(19, new MingleServer(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD).GetProject("test").Transitions.Count);
     var model = new ViewModel(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD);
     model.SelectProject("test");
     Assert.AreEqual(1, model.GetOneCard(126).Transitions.Count());
 }
 public void TestIsManagedListOfScalars()
 {
     var model = new ViewModel(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD);
     model.SelectProject("test");
     var card = model.GetOneCard(120);
     var p = card.Properties["Story Status"];
     Assert.IsTrue(p.IsManagedListOfScalars);
     p = card.Properties["Release"];
     Assert.IsFalse(p.IsManagedListOfScalars);
     p = card.Properties["Owner"];
     Assert.IsFalse(p.IsManagedListOfScalars);
 }
 public void TestSetPropertyValue()
 {
     var model = new ViewModel(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD);
     model.SelectProject("test");
     var card = model.GetOneCard(120);
     var p = card.Properties;
     card.SetPropertyOrAttributValue("description", "the quick brown fox jumped over the wall");
     card.SetPropertyOrAttributValue("Owner", "mark");
     card.Update();
     card = model.GetOneCard(120);
     Assert.AreEqual("the quick brown fox jumped over the wall", card.Description);
     Assert.AreEqual("mark", card.Properties["Owner"].Value);
     // Reset the data
     card.SetPropertyOrAttributValue("description", string.Empty);
     card.SetPropertyOrAttributValue("Owner", string.Empty);
     card.Update();
 }
 public void TestGetPropertyScalarValue()
 {
     //var model = new ViewModel("card_property.xml");
     var model = new ViewModel(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD);
     model.SelectProject("test");
     var card = model.GetOneCard(92);
     Assert.IsInstanceOfType(card, typeof(Card));
     Assert.AreEqual("Essential", card.Properties["Priority"].Value);
 }
 public void TestGetOneCard()
 {
     var model = new ViewModel(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD);
     model.SelectProject("test");
     var card = model.GetOneCard(120);
     Assert.AreEqual("This is a card for testing", card.Name);
 }
        public void TestGetCardProperties()
        {
            var model = new ViewModel(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD);
            model.SelectProject("test");
            var card = model.GetOneCard(92);
            Assert.IsInstanceOfType(card, typeof(Card));
            var p = card.Properties["Priority"] as CardProperty;
            Assert.AreEqual("Essential", p.Value);
            Assert.AreEqual("managed text list", p.PropertyValuesDescription.ToLower());
            Assert.AreEqual(false, p.Hidden);
            Assert.AreEqual(5, p.PropertyValueDetails.Count);
            Assert.AreEqual("(not set)", p.PropertyValueDetails[0]);
            Assert.AreEqual("Critical", p.PropertyValueDetails[1]);
            Assert.AreEqual("Essential", p.PropertyValueDetails[2]);
            Assert.AreEqual("Non-Essential", p.PropertyValueDetails[3]);
            Assert.AreEqual("Nice to have", p.PropertyValueDetails[4]);
            try
            {
                Assert.AreEqual("Nice to have", p.PropertyValueDetails[4]);
            }
            catch (Exception ex)
            {
                Assert.IsInstanceOfType(ex, typeof(ArgumentOutOfRangeException));
            }

            p = card.Properties["Added to Scope On"] as CardProperty;
            Assert.AreEqual("2008-01-02", p.Value);
            Assert.AreEqual(true, p.Hidden);

            p = card.Properties["Analysis Completed in Iteration"] as CardProperty;
            Assert.AreEqual(false, p.Hidden);
            Assert.AreEqual("35", p.Value);
            model.SelectProject("test");
            Assert.AreEqual("Iteration 2", model.GetOneCard(35).Name);
        }
 public void TestCardValuedPropertyNotSet()
 {
     var model = new ViewModel(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD);
     model.SelectProject("test");
     var card = model.GetOneCard(36);
     var p = card.Properties;
     card.SetPropertyOrAttributValue("Release", "32");
     card.Update();
 }
 public void TestCardTransitions()
 {
     var model = new ViewModel(_mingleHost, MINGLE_INTEGRATION_USER, MINGLE_INTEGRATION_PASSWORD);
     model.SelectProject("test");
     // Touch the Transitions property to populate the cache
     var transitions = model.GetOneCard(7).Transitions.ToList();
     Assert.AreNotEqual(null, transitions);
     Assert.AreEqual(3, transitions.Count());
 }