Beispiel #1
0
        public void Domain_SupportsVersion()
        {
            var domain = new SerializationDomain(new Version(1, 0, 0, 0));

            Assert.IsTrue(domain.SupportsVersion(new Version(1, 0)));
            Assert.IsTrue(domain.SupportsVersion(new Version(0, 9)));
            Assert.IsFalse(domain.SupportsVersion(new Version(2, 0)));
        }
Beispiel #2
0
        public void Domain_AddMember_Exceptions()
        {
            var domain = new SerializationDomain(BonsaiVersion.Default);

            AssertEx.ThrowsException <ArgumentNullException>(() => domain.AddMember(member: null), ex => Assert.AreEqual(ex.ParamName, "member"));
        }