Example #1
0
        public void RemoveItemWithComments()
        {
            var penis = new PENIS(File);


            penis.Remove("Hey");

            Assert.AreEqual(@"#comment
Ints:
    - 1 #comment
    - 2
    - 3
#another comment

Recursion:
    Ints:
        - 4
        - 5
        - 6
    Hey: no

#before
#it's ending
", penis.Serialize());
        }
Example #2
0
        public void SetItemToList()
        {
            var penis = new PENIS(File);

            penis.Set("Hey", new[] { 1, 2, 3 });

            Assert.AreEqual(@"#comment
Ints:
    - 1 #comment
    - 2
    - 3
#another comment

Recursion:
    Ints:
        - 4
        - 5
        - 6
    Hey: no

#before
Hey:
    - 1
    - 2
    - 3
#it's ending
", penis.Serialize());
        }
Example #3
0
        public void SetItemToItem()
        {
            var penis = new PENIS(File);

            penis.Set("Hey", 42);

            Assert.AreEqual(@"#comment
Ints:
    - 1 #comment
    - 2
    - 3
#another comment

Recursion:
    Ints:
        - 4
        - 5
        - 6
    Hey: no

#before
Hey: 42 #not much, hbu
#it's ending
", penis.Serialize());
        }
Example #4
0
        public void AddList()
        {
            var penis = new PENIS(File);

            penis.Set("Foo", new[] { 1, 2, 3 });

            Assert.AreEqual(@"#comment
Ints:
    - 1 #comment
    - 2
    - 3
#another comment

Recursion:
    Ints:
        - 4
        - 5
        - 6
    Hey: no

#before
Hey: what's up #not much, hbu
#it's ending

Foo:
    - 1
    - 2
    - 3", penis.Serialize());
        }
Example #5
0
        public void RemoveListItemWithComments()
        {
            var penis = new PENIS(File);

            penis.Remove("Ints");

            Assert.AreEqual(penis.Serialize(), @"#comment
#another comment

Recursion:
    Ints:
        - 4
        - 5
        - 6
    Hey: no

#before
Hey: what's up #not much, hbu
#it's ending
");
        }