Exemplo n.º 1
0
        public void AddIn_Should_Return_False_On_Adding_Existing_Code()
        {
            const int One = 0x0001;
            const string OneString = "One";

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

            table.AddIn(One, OneString).Should().BeFalse();
        }
Exemplo n.º 2
0
        public void AddIn_Should_Return_False_On_Adding_Existing_Code()
        {
            const int    One       = 0x0001;
            const string OneString = "One";

            var table = new TestTable();

            table.AddIn(One, OneString);

            table.AddIn(One, OneString).Should().BeFalse();
        }
Exemplo n.º 3
0
        public void AddIn_Should_Return_True_On_Adding_New_Code()
        {
            const int One = 0x0001;
            var table = new TestTable();

            table.AddIn(One, "One").Should().BeTrue();
        }
Exemplo n.º 4
0
        public void AddIn_Should_Return_True_On_Adding_New_Code()
        {
            const int One   = 0x0001;
            var       table = new TestTable();

            table.AddIn(One, "One").Should().BeTrue();
        }
Exemplo n.º 5
0
        public void GetIncomingLabel_Should_Return_Correct_Label()
        {
            const int    One       = 0x0001;
            const string OneString = "One";

            var table = new TestTable();

            table.AddIn(One, OneString);

            table.GetIncomingLabel(One).Should().Be(OneString);
        }
Exemplo n.º 6
0
        public void TryGetIncomingLabel_Should_Return_True_For_Existing_Code()
        {
            const int Zero = 0x0000;

            var table = new TestTable();

            table.AddIn(Zero, "Zero");

            string s;

            table.TryGetIncomingLabel(Zero, out s).Should().BeTrue();
        }
Exemplo n.º 7
0
        public void TryGetIncomingLabel_Should_Return_False_For_Missing_Code()
        {
            const int Zero = 0x0000;
            const int One  = 0x0001;

            var table = new TestTable();

            table.AddIn(Zero, "Zero");

            string s;

            table.TryGetIncomingLabel(One, out s).Should().BeFalse();
        }
Exemplo n.º 8
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>();
        }
Exemplo n.º 9
0
        public void TryGetIncomingLabel_Should_Retrieve_Correct_Label()
        {
            const int    One       = 0x0001;
            const string OneString = "One";

            var table = new TestTable();

            table.AddIn(One, OneString);

            string label;

            table.TryGetIncomingLabel(One, out label);
            label.Should().Be(OneString);
        }
Exemplo n.º 10
0
        public void GetIncomingLabel_Should_Return_Correct_Label()
        {
            const int One = 0x0001;
            const string OneString = "One";

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

            table.GetIncomingLabel(One).Should().Be(OneString);
        }
Exemplo n.º 11
0
        public void TryGetIncomingLabel_Should_Return_True_For_Existing_Code()
        {
            const int Zero = 0x0000;

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

            string s;
            table.TryGetIncomingLabel(Zero, out s).Should().BeTrue();
        }
Exemplo n.º 12
0
        public void TryGetIncomingLabel_Should_Return_False_For_Missing_Code()
        {
            const int Zero = 0x0000;
            const int One = 0x0001;

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

            string s;
            table.TryGetIncomingLabel(One, out s).Should().BeFalse();
        }
Exemplo n.º 13
0
        public void TryGetIncomingLabel_Should_Retrieve_Correct_Label()
        {
            const int One = 0x0001;
            const string OneString = "One";

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

            string label;
            table.TryGetIncomingLabel(One, out label);
            label.Should().Be(OneString);
        }
Exemplo n.º 14
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>();
        }