Exemplo n.º 1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="StreamingChannelDTO" /> class.
        /// </summary>
        /// <param name="channel">The <see cref="streamingChannel" /> used for creating instance</param>
        internal StreamingChannelDTO(streamingChannel channel)
        {
            Contract.Requires(channel != null);
            Contract.Requires(!string.IsNullOrEmpty(channel.name));

            Id   = channel.id;
            Name = channel.name;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="StreamingChannelDTO"/> class.
        /// </summary>
        /// <param name="channel">The <see cref="streamingChannel"/> used for creating instance</param>
        internal StreamingChannelDTO(streamingChannel channel)
        {
            Guard.Argument(channel, nameof(channel)).NotNull();
            Guard.Argument(channel.name, nameof(channel.name)).NotNull().NotEmpty();

            Id   = channel.id;
            Name = channel.name;
        }
Exemplo n.º 3
0
        public void StreamingChannelTest()
        {
            var streamingChannelType = new streamingChannel
            {
                id   = 1,
                name = "name 1"
            };
            var streamingChannelDTO = new StreamingChannelDTO(streamingChannelType);
            var streamingChannelCI  = new StreamingChannelCI(streamingChannelDTO);

            Assert.IsNotNull(streamingChannelCI);
            Assert.AreEqual(streamingChannelType.id, streamingChannelCI.Id);
            Assert.AreEqual(streamingChannelType.name, streamingChannelCI.Name);
        }