Exemple #1
0
        public void ModifiesRepresentationState()
        {
            var representation = new ModifiedStateRepresentation();
            var resource       = new ResourceModel
            {
                A = 1,
                B = 2,
                C = 3
            };

            var hal = ((IHal)representation).RepresentationOf(resource);

            hal.State.Should().BeEquivalentTo(new
            {
                A = 1
            });
        }
Exemple #2
0
        public async Task RepresentationOf_ModifiesRepresentationState()
        {
            var representation = new ModifiedStateRepresentation();
            var resource       = new ResourceModel
            {
                A = 1,
                B = 2,
                C = 3
            };

            var hal = await((IHal)representation).RepresentationOfAsync(resource);

            hal.State.Should().BeEquivalentTo(new
            {
                A = 1
            });
        }