Example #1
0
        public void List_of_strings()
        {
            var data = new SecurityProfile();

            data.AddSecurityId("t1");

            var sut = new ShadowCopier();

            var result = sut.Copy(data);

            Assert.IsTrue(new Comparer().AreEqual(data, result));
        }
Example #2
0
        public void Hydrate_slightly_complex_object()
        {
            var data = new SecurityProfile();

            data.AddSecurityId("t1");
            using (var session = Database.CreateSession())
            {
                session.Add(data);
                session.Commit();
            }

            SecurityProfile actual;

            using (var session = Database.CreateSession())
            {
                actual = session.GetById <SecurityProfile>(data.Id);
            }

            Assert.IsTrue(data.SecruityIds.All(x => actual.SecruityIds.Contains(x)));
        }