Beispiel #1
0
        public void ToDictionary_SerializesPublicPropertiesOnly()
        {
            var hash = new FakeClass(3)
            {
                Name = "Mozart"
            }.ToDictionary();

            Assert.AreEqual(3, hash["Id"]);
            Assert.AreEqual("Mozart", hash["Name"]);
            Assert.AreEqual(2, hash.Count);
        }
Beispiel #2
0
        public void CreateType_ReturnsInstanceWithParameters()
        {
            FakeClass type = "CodeBetter.Extensions.Tests.FakeClass, CodeBetter.Extensions.Tests".CreateType <FakeClass>(1);

            Assert.AreEqual(1, type.Id);
        }