Ejemplo n.º 1
0
        public void PropertyTest2()
        {
            Car car = new Coupe {
                Brand = "Toyota", Model = "Corolla", Year = 2008, Description = "Aggressive feel."
            };
            string generated = SaveToString(new VSContainer2 {
                Vehicle = car
            });
            string expected = @"<VSContainer2 Vehicle=""Car: Toyota"" xmlns=""clr-namespace:Test.Elements;assembly=XamlTestClasses"" />";

            Assert.AreEqual(expected, generated);
        }
Ejemplo n.º 2
0
        public void DerivedClassTest3()
        {
            Car car = new Coupe {
                Brand = "Toyota", Model = "Corolla", Year = 2008, Description = "Aggressive feel."
            };
            string generated = SaveToString(new VSContainer {
                Vehicle = car
            });
            string expected =
                @"<VSContainer xmlns=""clr-namespace:Test.Elements;assembly=XamlTestClasses"">
  <VSContainer.Vehicle>
    <Coupe Brand=""Toyota"" Description=""Aggressive feel."" Model=""Corolla"" Year=""2008"" />
  </VSContainer.Vehicle>
</VSContainer>";

            Assert.AreEqual(expected, generated);
        }