| 71 | | # TODO: Implement tests for Ipv4Network relationship |
|---|
| | 73 | l3_interface = L3Interface.new |
|---|
| | 74 | l3_interface.ipv4_address = "10.1.1.1" |
|---|
| | 75 | l3_interface.ipv4_netmask = "255.255.255.252" |
|---|
| | 76 | |
|---|
| | 77 | l3_interface.ipv4_network?.network_address.should eql("10.1.1.0") |
|---|
| | 78 | l3_interface.ipv4_network?.network_mask.should eql("255.255.255.0") |
|---|
| | 79 | l3_interface.ipv4_network?.network_description.should eql("First subnet of 10.1.0.0/16") |
|---|
| | 80 | end |
|---|
| | 81 | |
|---|
| | 82 | it "should not perform a longest network prefix lookup on invalid addresses" do |
|---|
| | 83 | l3_interface = L3Interface.new |
|---|
| | 84 | |
|---|
| | 85 | l3_interface.ipv4_network?.should be_nil |
|---|