Esempio n. 1
0
        public void TestGuid()
        {
            Statement statement = new Statement(
                "statement-guid",
                new PropertySomeValueSnak("P42"),
                new List<Snak>(),
                new List<Snak>()
            );

            Assert.Equal("statement-guid", statement.Guid);
        }
Esempio n. 2
0
        public void TestQualifiers()
        {
            Statement statement = new Statement(
                new PropertySomeValueSnak("P42"),
                new List<Snak> { new PropertyNoValueSnak("P42"), new PropertySomeValueSnak("P31") }
            );

            Assert.Equal(2, statement.Qualifiers.Count);

            Assert.Equal("P42", statement.Qualifiers[0].PropertyId.Serialization);
            Assert.Equal(SnakType.NoValueSnak, statement.Qualifiers[0].Type);

            Assert.Equal("P31", statement.Qualifiers[1].PropertyId.Serialization);
            Assert.Equal(SnakType.SomeValueSnak, statement.Qualifiers[1].Type);
        }
Esempio n. 3
0
 public void TestPropertyId()
 {
     Statement statement = new Statement(new PropertySomeValueSnak("P42"));
     Assert.Equal("P42", statement.PropertyId.Serialization);
 }
Esempio n. 4
0
 public void TestSnak()
 {
     Statement statement = new Statement(new PropertySomeValueSnak("P42"));
     Assert.Equal("P42", statement.Snak.PropertyId.Serialization);
     Assert.Equal(SnakType.SomeValueSnak, statement.Snak.Type);
 }