Example #1
0
        public void ShouldOutputFromInt()
        {
            IWrite writer = new ConsoleWrite();
            IInto  value  = new IntegerOf(3);

            value.Into(writer);
        }
Example #2
0
        public void ShouldTestIntegerWrites()
        {
            FakeWrite fakeWrite = new FakeWrite();
            Integer   integer   = new IntegerOf(3);

            integer.Into(fakeWrite);


            Assert.IsTrue(integer.IsEqual(fakeWrite.Item));
        }
        public void ShouldReturnSumOfTwoInts()
        {
            //Arrange
            Integer expected = new IntegerOf(9);
            Integer augend   = new IntegerOf(4);
            Integer addend   = new IntegerOf(5);
            Integer subject  = augend.Add(addend);

            //Act
            //Assert
            Assert.IsTrue(subject.IsEqual(expected), $"Actual <{(int)subject}> was not the same as Expected <{(int)expected}>");
        }