Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 private static void TryGetNullCode(TestTable t)
 {
     ushort code;
     t.TryGetOutgoingCode(null, out code);
 }
Exemplo n.º 5
0
 private static void TryGetEmptyCode(TestTable t)
 {
     ushort code;
     t.TryGetOutgoingCode("", out code);
 }
Exemplo n.º 6
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();
        }
Exemplo n.º 7
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();
        }
Exemplo n.º 8
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);
        }
Exemplo n.º 9
0
        private static void TryGetEmptyCode(TestTable t)
        {
            ushort code;

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

            t.TryGetOutgoingCode(null, out code);
        }