public void AddOut_Should_Throw_On_Empty_Label()
        {
            var table = new TestTable();

            table
                .Invoking(t => t.AddOut("", 0x0000))
                .ShouldThrow<ArgumentException>();
        }
Beispiel #2
0
        public void AddIn_Should_Throw_On_Empty_Label()
        {
            var table = new TestTable();

            table
            .Invoking(t => t.AddIn(0x0000, ""))
            .ShouldThrow <ArgumentException>();
        }
        public void AddIn_Should_Throw_On_Null_Label()
        {
            var table = new TestTable();

            table
                .Invoking(t => t.AddIn(0x0000, null))
                .ShouldThrow<ArgumentNullException>();
        }
Beispiel #4
0
        public void AddIn_Should_Throw_On_Null_Label()
        {
            var table = new TestTable();

            table
            .Invoking(t => t.AddIn(0x0000, null))
            .ShouldThrow <ArgumentNullException>();
        }
Beispiel #5
0
        public void LoadPacketCodes_Should_Not_Throw()
        {
            var table = new TestTable();

            table
            .Invoking(t => t.LoadPacketCodes())
            .ShouldNotThrow();
        }
Beispiel #6
0
        public void TryGetOutgoingCode_Should_Throw_On_Empty_Label()
        {
            var table = new TestTable();

            table
            .Invoking(TryGetEmptyCode)
            .ShouldThrow <ArgumentException>();
        }
Beispiel #7
0
        public void GetIncomingLabel_Should_Throw_KeyNotFoundException_For_Missing_Code()
        {
            const int Zero = 0x0000;
            const int One  = 0x0001;

            var table = new TestTable();

            table.AddIn(Zero, "Zero");

            table
            .Invoking(t => t.GetIncomingLabel(One))
            .ShouldThrow <KeyNotFoundException>();
        }
Beispiel #8
0
        public void GetOutgoingCode_Should_Throw_For_Missing_Label()
        {
            const int    One        = 0x0001;
            const string ZeroString = "Zero";
            const string OneString  = "One";

            var table = new TestTable();

            table.AddOut(OneString, One);

            table
            .Invoking(t => t.GetOutgoingCode(ZeroString))
            .ShouldThrow <KeyNotFoundException>();
        }
        public void TryGetOutgoingCode_Should_Throw_On_Null_Label()
        {
            var table = new TestTable();

            table
                .Invoking(TryGetNullCode)
                .ShouldThrow<ArgumentNullException>();
        }
        public void LoadPacketCodes_Should_Not_Throw()
        {
            var table = new TestTable();

            table
                .Invoking(t => t.LoadPacketCodes())
                .ShouldNotThrow();
        }
        public void GetOutgoingCode_Should_Throw_For_Missing_Label()
        {
            const int One = 0x0001;
            const string ZeroString = "Zero";
            const string OneString = "One";

            var table = new TestTable();
            table.AddOut(OneString, One);

            table
                .Invoking(t => t.GetOutgoingCode(ZeroString))
                .ShouldThrow<KeyNotFoundException>();
        }
        public void GetIncomingLabel_Should_Throw_KeyNotFoundException_For_Missing_Code()
        {
            const int Zero = 0x0000;
            const int One = 0x0001;

            var table = new TestTable();
            table.AddIn(Zero, "Zero");

            table
                .Invoking(t => t.GetIncomingLabel(One))
                .ShouldThrow<KeyNotFoundException>();
        }