示例#1
0
        public void AddDuplicate()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
            ParameterizedStringPart           part       = new ParameterizedStringPart("somename", "somedata");

            collection.Add(part);
            collection.Add(part);
        }
示例#2
0
        public void CopyToOverflowIndex()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            ParameterizedStringPart[] parts = new ParameterizedStringPart[1];

            collection.Add(new ParameterizedStringPart("somename", "somevalue"));
            collection.Add(new ParameterizedStringPart("othername", "othervalue"));
            collection.CopyTo(parts, 3);
        }
示例#3
0
        public void CopyToZeroIndex()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            ParameterizedStringPart[] parts = new ParameterizedStringPart[2];

            collection.Add(new ParameterizedStringPart("somename", "somevalue"));
            collection.Add(new ParameterizedStringPart("othername", "othervalue"));
            collection.CopyTo(parts, 0);
            Assert.IsNotNull(parts[0]);
            Assert.IsNotNull(parts[1]);
            Assert.AreEqual("somename", parts[0].ParameterName);
            Assert.AreEqual("othername", parts[1].ParameterName);
        }
示例#4
0
        public void Contains()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("somedata", "somevalue"));
            collection.Contains(new ParameterizedStringPart("somedata", "somevalue"));
        }
示例#5
0
        public void IndexOf()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("somename", "somedata"));
            Assert.AreEqual(0, collection.IndexOf("somename"));
        }
示例#6
0
        public void RemoveString()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("somename", "somedata"));
            Assert.IsTrue(collection.Remove("somename"));
        }
        public void Clear()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
            collection.Add(new ParameterizedStringPart("somedata", "somevalue"));
            Assert.AreNotEqual(0, collection.Count);

            collection.Clear();
            Assert.AreEqual(0, collection.Count);
        }
示例#8
0
        public void ThisName()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("somename", "somedata"));
            Assert.AreEqual(1, collection.Count);
            Assert.IsNotNull(collection[0]);
            Assert.AreEqual("somedata", collection["somename"].LiteralValue);
        }
示例#9
0
        public void Clear()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("somedata", "somevalue"));
            Assert.AreNotEqual(0, collection.Count);

            collection.Clear();
            Assert.AreEqual(0, collection.Count);
        }
        public void CopyToZeroIndex()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
            ParameterizedStringPart[] parts = new ParameterizedStringPart[2];

            collection.Add(new ParameterizedStringPart("somename", "somevalue"));
            collection.Add(new ParameterizedStringPart("othername", "othervalue"));
            collection.CopyTo(parts, 0);
            Assert.IsNotNull(parts[0]);
            Assert.IsNotNull(parts[1]);
            Assert.AreEqual("somename", parts[0].ParameterName);
            Assert.AreEqual("othername", parts[1].ParameterName);
        }
        public void CopyToOverflowIndex()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
            ParameterizedStringPart[] parts = new ParameterizedStringPart[1];

            collection.Add(new ParameterizedStringPart("somename", "somevalue"));
            collection.Add(new ParameterizedStringPart("othername", "othervalue"));
            collection.CopyTo(parts, 3);
        }
 public void Contains()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(new ParameterizedStringPart("somedata", "somevalue"));
     collection.Contains(new ParameterizedStringPart("somedata", "somevalue"));
 }
示例#13
0
        public void AddNull()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(null);
        }
 public void AddLiteral()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(new ParameterizedStringPart("literal-value"));
 }
 public void IndexOf()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(new ParameterizedStringPart("somename", "somedata"));
     Assert.AreEqual(0, collection.IndexOf("somename"));
 }
 public void AddNull() {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(null);
 }
 public void ThisName()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(new ParameterizedStringPart("somename", "somedata"));
     Assert.AreEqual(1, collection.Count);
     Assert.IsNotNull(collection[0]);
     Assert.AreEqual("somedata", collection["somename"].LiteralValue);
 }
 public void RemoveString()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(new ParameterizedStringPart("somename", "somedata"));
     Assert.IsTrue(collection.Remove("somename"));
 }
 public void AddDuplicate() {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     ParameterizedStringPart part = new ParameterizedStringPart("somename", "somedata");
     collection.Add(part);
     collection.Add(part);
 }
示例#20
0
        public void AddLiteral()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("literal-value"));
        }