Beispiel #1
0
        public void IsSameAs_MessageTextAreDifferent_ReturnsFalse()
        {
            MessageBase messageBase1 = new MessageBase("Text1");
            MessageBase messageBase2 = new MessageBase("Text2");

            messageBase1.IsSameAs(messageBase2).ShouldBeFalse();
        }
Beispiel #2
0
        public void IsSameAs_MessageTextIsTheSame_ReturnsTrue()
        {
            MessageBase messageBase1 = new MessageBase("Text");
            MessageBase messageBase2 = new MessageBase("Text");

            messageBase1.IsSameAs(messageBase2).ShouldBeTrue();
        }
Beispiel #3
0
        public void IsSameAs_SameObject_ThrowsMeaningfulException()
        {
            MessageBase messageBase = new MessageBase("Text");

            Should.Throw <Exception>(() =>
            {
                messageBase.IsSameAs(messageBase);
            }).Message.ShouldBe("IsSameAs cannot be used to compare the same object");
        }