Пример #1
0
        public virtual void TestStandaloneClassesAssumedMultiswitch()
        {
            DNSToSwitchMapping mapping = new TestSwitchMapping.StandaloneSwitchMapping();

            NUnit.Framework.Assert.IsFalse("Expected to be multi switch " + mapping, AbstractDNSToSwitchMapping
                                           .IsMappingSingleSwitch(mapping));
        }
Пример #2
0
        public virtual void TestNoFilenameMeansSingleSwitch()
        {
            Configuration      conf    = new Configuration();
            ScriptBasedMapping mapping = CreateMapping(conf);

            Assert.True("Expected to be single switch", mapping.IsSingleSwitch
                            ());
            Assert.True("Expected to be single switch", AbstractDNSToSwitchMapping
                        .IsMappingSingleSwitch(mapping));
        }
Пример #3
0
 public virtual void TestNullMapping()
 {
     NUnit.Framework.Assert.IsFalse(AbstractDNSToSwitchMapping.IsMappingSingleSwitch(null
                                                                                     ));
 }
Пример #4
0
 protected internal virtual void AssertMapSize(AbstractDNSToSwitchMapping switchMapping
                                               , int expectedSize)
 {
     Assert.Equal("Expected two entries in the map " + switchMapping
                  .DumpTopology(), expectedSize, switchMapping.GetSwitchMap().Count);
 }
Пример #5
0
 private void AssertMultiSwitch(DNSToSwitchMapping mapping)
 {
     Assert.Equal("Expected a multi switch mapping " + mapping, false
                  , AbstractDNSToSwitchMapping.IsMappingSingleSwitch(mapping));
 }
Пример #6
0
 private void AssertSingleSwitch(DNSToSwitchMapping mapping)
 {
     Assert.Equal("Expected a single switch mapping " + mapping, true
                  , AbstractDNSToSwitchMapping.IsMappingSingleSwitch(mapping));
 }