Exemplo n.º 1
0
        public void Mapper_Should_Use_Attribute_Scope()
        {
            // arrange
            var config = BuildSampleConfiguration();
            var obj    = new ScopedSampleObject();

            // act
            config.Map(obj);

            // assert
            Assert.Equal("Scope1Value1", obj.Key1);
        }
        public void Mapper_Should_Use_Scope_From_Parameter_Over_Attribute()
        {
            // arrange
            var mapper = new ConfigurationPropertyMapper(BuildSampleConfiguration());
            var obj    = new ScopedSampleObject();

            // act
            mapper.Map(obj, "Scope2");

            // assert
            Assert.Equal(obj.Key1, "Scope2Value1");
        }