예제 #1
0
            public void WithEmptyResponseTextElement()
            {
                // Arrange
                const string xml = "<ResponseText></ResponseText>";
                var expected = new ResponseText();

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

                // Assert
                DtoAssert.AreEqual(expected, actual);
            }
예제 #2
0
            public void WithFullSpecifiedResponseTextEntry()
            {
                // Arrange
                const string xml =
                    @"<ResponseText>
                        <Public>1</Public>
                        <AlarmResponseText>Notify local police office</AlarmResponseText>
                        <PartitionName>Local</PartitionName>
                        <AlarmResponseName>Call Police</AlarmResponseName>
                      </ResponseText>";

                var expected = new ResponseText("Local", 1, "Call Police", "Notify local police office");

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

                // Assert
                DtoAssert.AreEqual(expected, actual);
            }
 /// <summary>
 /// Initializes a default instance of the <see cref="AlarmGetResponseTextListReply"/> class.
 /// All properties except ResponseTexts will have their C# default value.
 /// ResponseTexts will default to an empty list to match the XML deserializer behavior
 /// when deserializing and empty AlarmGetResponseTextListReply element.
 /// </summary>
 public AlarmGetResponseTextListReply()
 {
     ResponseTexts = new ResponseText[0];
 }