コード例 #1
0
        public void FromEntryTestInvalidEnumInputThrows()
        {
            List <string> list    = new List <string>(new[] { "One", "Nine", "Five" });
            DynamoDBList  dbEntry = DynamoDBList.Create(list);

            _sut.Invoking((c) => c.FromEntry(dbEntry))
            .Should().Throw <ArgumentException>();
        }
コード例 #2
0
        public void FromEntryTestEnumValuesReturnsConvertedValues()
        {
            List <string> list    = new List <string>(new[] { "One", "Four", "Five" });
            DynamoDBList  dbEntry = DynamoDBList.Create(list);

            List <Number> expected = new List <Number>(new[] { Number.One, Number.Four, Number.Five });

            ((List <Number>)_sut.FromEntry(dbEntry)).Should().BeEquivalentTo(expected);
        }