Ejemplo n.º 1
0
            public void Must_map_to_corresponding_enum_value()
            {
                var systemUnderTest = new FooEnumEnumerationMapper();

                Assert.That(systemUnderTest.GetMappedValue(FooEnum.Three), Is.EqualTo(BarEnum.Three));
                Assert.That(systemUnderTest.GetMappedValue(FooEnum.Four), Is.EqualTo(BarEnum.Four));
            }
Ejemplo n.º 2
0
            public void Must_throw_exception_for_valid_mapping_when_nothing_matches()
            {
                var systemUnderTest = new FooEnumEnumerationMapper();

                Assert.Throws <Exception>(
                    systemUnderTest.Validate,
                    String.Format("Type '{0}' contains unmapped members.{1}A, B, C, D.", typeof(DifferentEnum).FullName, Environment.NewLine));
            }
Ejemplo n.º 3
0
            public void Must_have_a_valid_mapping()
            {
                var systemUnderTest = new FooEnumEnumerationMapper();

                systemUnderTest.Validate();
            }