Beispiel #1
0
        public void Contains()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("somedata", "somevalue"));
            collection.Contains(new ParameterizedStringPart("somedata", "somevalue"));
        }
Beispiel #2
0
        public void RemoveString()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("somename", "somedata"));
            Assert.IsTrue(collection.Remove("somename"));
        }
Beispiel #3
0
        public void IndexOf()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("somename", "somedata"));
            Assert.AreEqual(0, collection.IndexOf("somename"));
        }
 public void EmptyCopyTo()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     ParameterizedStringPart[] parts = new ParameterizedStringPart[1];
     collection.CopyTo(parts, 0);
     Assert.IsNull(parts[0]);
 }
Beispiel #5
0
        public void RemovePartInexistent()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
            ParameterizedStringPart           part       = new ParameterizedStringPart("literal-value");

            Assert.IsFalse(collection.Remove(part));
        }
Beispiel #6
0
        public void EmptyCopyTo()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            ParameterizedStringPart[] parts = new ParameterizedStringPart[1];
            collection.CopyTo(parts, 0);
            Assert.IsNull(parts[0]);
        }
Beispiel #7
0
        public void AddDuplicate()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
            ParameterizedStringPart           part       = new ParameterizedStringPart("somename", "somedata");

            collection.Add(part);
            collection.Add(part);
        }
Beispiel #8
0
        public void CopyToNullArray()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            ParameterizedStringPart[] parts = new ParameterizedStringPart[1];

            collection.CopyTo(null, 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);
        }
Beispiel #10
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);
        }
Beispiel #11
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);
        }
Beispiel #12
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);
        }
Beispiel #14
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);
        }
Beispiel #15
0
        public void AddNull()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(null);
        }
 public void Contains()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(new ParameterizedStringPart("somedata", "somevalue"));
     collection.Contains(new ParameterizedStringPart("somedata", "somevalue"));
 }
 public void IndexOf()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(new ParameterizedStringPart("somename", "somedata"));
     Assert.AreEqual(0, collection.IndexOf("somename"));
 }
 public void IndexOfWithNull() {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     Assert.AreEqual(-1, collection.IndexOf(null));
 }
 public void AddLiteral()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(new ParameterizedStringPart("literal-value"));
 }
 public void AddNull() {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     collection.Add(null);
 }
 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);
 }
 public void RemoveStringInexistent()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     Assert.IsFalse(collection.Remove("literal-value"));
 }
 public void RemoveStringNull()
 {
     ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
     Assert.IsFalse(collection.Remove((string)null));
 }
        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);
        }
Beispiel #26
0
        public void AddLiteral()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            collection.Add(new ParameterizedStringPart("literal-value"));
        }
Beispiel #27
0
        public void RemoveStringNull()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            Assert.IsFalse(collection.Remove((string)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 CopyToNullArray() {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();
            ParameterizedStringPart[] parts = new ParameterizedStringPart[1];

            collection.CopyTo(null, 0);
        }
Beispiel #30
0
        public void IndexOfWithNull()
        {
            ParameterizedStringPartCollection collection = new ParameterizedStringPartCollection();

            Assert.AreEqual(-1, collection.IndexOf(null));
        }