Beispiel #1
0
        public void get_with_concrete_type()
        {
            var serializer = new JsonNetSerializer();
            var camaro     = new NulloIdentityMapTests.Camaro();

            var json = serializer.ToJson(camaro);

            var map = new IdentityMap(serializer, null);

            map.Get <NulloIdentityMapTests.Car>(camaro.Id, typeof(NulloIdentityMapTests.Camaro), json, null)
            .ShouldBeOfType <NulloIdentityMapTests.Camaro>()
            .Id.ShouldBe(camaro.Id);
        }
        public void get_with_concrete_type()
        {
            var serializer = new JsonNetSerializer();
            var camaro = new NulloIdentityMapTests.Camaro();

            var json = serializer.ToJson(camaro);

            var map = new DirtyTrackingIdentityMap(serializer, null);

            map.Get<NulloIdentityMapTests.Car>(camaro.Id, typeof(NulloIdentityMapTests.Camaro), json)
                .ShouldBeOfType<NulloIdentityMapTests.Camaro>()
                .Id.ShouldBe(camaro.Id);


        }