Beispiel #1
0
        public void TryGetOutgoingCode_Should_Return_False_For_Missing_Label()
        {
            const int Zero = 0x0000;

            var table = new TestTable();

            table.AddOut("Zero", Zero);

            ushort code;

            table.TryGetOutgoingCode("One", out code).Should().BeFalse();
        }
Beispiel #2
0
        public void TryGetOutgoingCode_Should_Return_True_For_Existing_Label()
        {
            const int    Zero       = 0x0000;
            const string ZeroString = "Zero";

            var table = new TestTable();

            table.AddOut(ZeroString, Zero);

            ushort code;

            table.TryGetOutgoingCode(ZeroString, out code).Should().BeTrue();
        }
Beispiel #3
0
        public void TryGetOutgoingCode_Should_Retrieve_Correct_Code()
        {
            const int    One       = 0x0001;
            const string OneString = "One";

            var table = new TestTable();

            table.AddOut(OneString, One);

            ushort code;

            table.TryGetOutgoingCode(OneString, out code);
            code.Should().Be(One);
        }
 private static void TryGetNullCode(TestTable t)
 {
     ushort code;
     t.TryGetOutgoingCode(null, out code);
 }
 private static void TryGetEmptyCode(TestTable t)
 {
     ushort code;
     t.TryGetOutgoingCode("", out code);
 }
        public void TryGetOutgoingCode_Should_Return_True_For_Existing_Label()
        {
            const int Zero = 0x0000;
            const string ZeroString = "Zero";

            var table = new TestTable();
            table.AddOut(ZeroString, Zero);

            ushort code;
            table.TryGetOutgoingCode(ZeroString, out code).Should().BeTrue();
        }
        public void TryGetOutgoingCode_Should_Return_False_For_Missing_Label()
        {
            const int Zero = 0x0000;

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

            ushort code;
            table.TryGetOutgoingCode("One", out code).Should().BeFalse();
        }
        public void TryGetOutgoingCode_Should_Retrieve_Correct_Code()
        {
            const int One = 0x0001;
            const string OneString = "One";

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

            ushort code;
            table.TryGetOutgoingCode(OneString, out code);
            code.Should().Be(One);
        }
Beispiel #9
0
        private static void TryGetEmptyCode(TestTable t)
        {
            ushort code;

            t.TryGetOutgoingCode("", out code);
        }
Beispiel #10
0
        private static void TryGetNullCode(TestTable t)
        {
            ushort code;

            t.TryGetOutgoingCode(null, out code);
        }