public void AddOption()
        {
            var option = new DhcpSubnetMaskOption(IPAddress.Broadcast);

            var packet = DhcpPacketBuilder.Create()
                         .WithOption(option)
                         .Build();

            Assert.True(ReferenceEquals(option, packet.GetOption <DhcpSubnetMaskOption>()));
        }
        public void ReplaceExistingOption()
        {
            var option1 = new DhcpSubnetMaskOption(IPAddress.Broadcast);
            var option2 = new DhcpSubnetMaskOption(IPAddress.Broadcast);

            var packet = DhcpPacketBuilder.Create()
                         .WithOption(option1)
                         .WithOption(option2)
                         .Build();

            Assert.True(ReferenceEquals(option2, packet.GetOption <DhcpSubnetMaskOption>()));
        }
        public void ConvertSubnetMaskToCidrPrefix(IPAddress ipAddress, uint expectedCidrPrefix)
        {
            var option = new DhcpSubnetMaskOption(ipAddress);

            Assert.Equal(expectedCidrPrefix, option.CidrPrefix);
        }