Example #1
0
        public void NameTest()
        {
            // Arrange
            const string expected = "ExpectedName";

            // Act
            var actual = new SortKey { Name = "ExpectedName"};

            // Assert
            DtoAssert.AreEqual(expected, actual.Name);
        }
Example #2
0
        public void ConstructorAllMembersTest()
        {
            // Arrange
            var expected = new SortKey { SequenceNumber = "1", Name = "NameTest", StartKey = "StartKey", LastKey = "LastKey" };

            // Act
            var actual = new SortKey("1", "NameTest", "StartKey", "LastKey");

            // Assert
            DtoAssert.AreEqual(expected, actual);
        }
Example #3
0
        public void WithAllElementsPresent()
        {
            // Arrange
            var expected = new SortKey("1", "SortName", "StartKey", "LastKey");
            const string xml = @"<SortKey SequenceNumber=""1"">
                                <Name>SortName</Name>
                                <StartKey>StartKey</StartKey>
                                <LastKey>LastKey</LastKey>
                            </SortKey>";

            // Act
            var actual = _sortKeySerializer.Deserialize(xml);

            // Assert
            DtoAssert.AreEqual(expected, actual);
        }
Example #4
0
        public void WithAllSortKeyElementsMissing()
        {
            // Arrange
            var expected = new SortKey();
            const string xml = @"<SortKey>
                                 </SortKey>";

            // Act
            var actual = _sortKeySerializer.Deserialize(xml);

            // Assert
            DtoAssert.AreEqual(expected, actual);
        }