Exemplo n.º 1
0
        public void Ticket()
        {
            var ticketBuilder = new PipeTicketBuilder();
            Guid pipeId = Guid.NewGuid();
            ticketBuilder.PipeId = pipeId;

            BlobType content = BlobType.Network;
            ticketBuilder.ContentType = content;

            Guid srcElId = Guid.NewGuid();
            ticketBuilder.SrcElementId = srcElId;

            Guid srcPortId = Guid.NewGuid();
            ticketBuilder.SrcPortId = srcPortId;

            Guid destElId = Guid.NewGuid();
            ticketBuilder.DestElementId = destElId;

            Guid destPortId = Guid.NewGuid();
            ticketBuilder.DestPortId = destPortId;

            IPipeTicket ticket = ticketBuilder.Ticket;

            Assert.NotNull(ticket);
            Assert.Equal(pipeId, ticket.PipeId);
            Assert.Equal(content, ticket.ContentType);
            Assert.Equal(srcElId, ticket.SrcElementId);
            Assert.Equal(srcPortId, ticket.SrcPortId);
            Assert.Equal(destElId, ticket.DestElementId);
            Assert.Equal(destPortId, ticket.DestPortId);
        }
Exemplo n.º 2
0
        public void ContentType(BlobType content)
        {
            var ticketBuilder = new PipeTicketBuilder();
            ticketBuilder.ContentType = content;

            Assert.Equal(content, ticketBuilder.ContentType);
        }
Exemplo n.º 3
0
        public void SrcPortId()
        {
            var ticketBuilder = new PipeTicketBuilder();
            Guid id = Guid.NewGuid();
            ticketBuilder.SrcPortId = id;

            Assert.Equal(id, ticketBuilder.SrcPortId);
        }
Exemplo n.º 4
0
        public void DestElementId()
        {
            var ticketBuilder = new PipeTicketBuilder();
            Guid id = Guid.NewGuid();
            ticketBuilder.DestElementId = id;

            Assert.Equal(id, ticketBuilder.DestElementId);
        }