Example #1
0
    public void ParseIntoTest1()
    {
        var list = new List <PropertyID>();

        PropertyID.ParseInto(list, "");

        Assert.AreEqual(0, list.Count);
    }
Example #2
0
    public void ParseIntoTest2()
    {
        var list = new List <PropertyID>();

        PropertyID.ParseInto(list, "4");

        Assert.AreEqual(1, list.Count);
        Assert.AreEqual(new PropertyID(4), list[0]);
    }
Example #3
0
    public void ParseIntoTest7()
    {
        var list = new List <PropertyID>();

        PropertyID.ParseInto(list, "9,22.15,7,2.0");

        Assert.AreEqual(2, list.Count);
        Assert.AreEqual(new PropertyID(9), list[0]);
        Assert.AreEqual(new PropertyID(7), list[1]);
    }
Example #4
0
    public void ParseIntoTest3()
    {
        var list = new List <PropertyID>();

        PropertyID.ParseInto(list, "4.9");

        Assert.AreEqual(1, list.Count);
        var pidMap = new PropertyIDMapping(9, new Uri("http://folkerkinzel.de/"));

        Assert.AreEqual(new PropertyID(4, pidMap), list[0]);
    }
Example #5
0
    public void ParseIntoTest6()
    {
        var list = new List <PropertyID>();

        PropertyID.ParseInto(list, "4.9,6.0,7.5");

        Assert.AreEqual(2, list.Count);
        var uri = new Uri("http://folker.de/");

        Assert.AreEqual(new PropertyID(4, new PropertyIDMapping(9, uri)), list[0]);
        Assert.AreEqual(new PropertyID(7, new PropertyIDMapping(5, uri)), list[1]);
    }
Example #6
0
    public void ParseIntoTest8()
    {
        var list = new List <PropertyID>();

        PropertyID.ParseInto(list, " \"4.9\"");

        Assert.AreEqual(1, list.Count);

        var uri = new Uri("http://folker.de/");

        Assert.AreEqual(new PropertyID(4, new PropertyIDMapping(9, uri)), list[0]);
    }