Esempio n. 1
0
        public void FailUnserialize()
        {
            var ressource = new RessourceString("test", "value", CultureInfo.GetCultureInfo(1));

            ressource.Invoking(x => x.UnSerialize(null, null)).Should().Throw <ArgumentNullException>();

            var xdoc = XDocument.Parse(@"<test></test>");

            using (var reader = xdoc.CreateReader())
            {
                ressource.Invoking(x => x.UnSerialize(reader, null))
                .Should()
                .Throw <InvalidOperationException>();
            }
        }
Esempio n. 2
0
        public void FailSerialize()
        {
            var ressource = new RessourceString("test", "value", CultureInfo.GetCultureInfo(1));

            ressource.Invoking(x => x.Serialize(null, null)).Should().Throw <ArgumentNullException>();
        }