Exemplo n.º 1
0
        public void No_match_if_something_else()
        {
            var simonChurch = new SimonChurch();
            var matcher = Is.InstanceOf(typeof(ShaneLong));

            var matches = matcher.Matches(simonChurch);

            Assert.That(matches, Is.False());
        }
Exemplo n.º 2
0
        public void No_match_if_something_else()
        {
            var simonChurch = new SimonChurch();
            var matcher     = Is.InstanceOf(typeof(ShaneLong));

            var matches = matcher.Matches(simonChurch);

            Assert.That(matches, Is.False());
        }
Exemplo n.º 3
0
        public void Describe_mismatch()
        {
            var simonChurch = new SimonChurch();
            var matcher = Is.InstanceOf(typeof(ShaneLong));
            var description = new StringDescription();

            matcher.DescribeMismatch(simonChurch, description);

            const string errorMessage = "Simon Church is an instance of NHamcrest.Tests.Core.IsInstanceOfTests+SimonChurch not" +
                                        " NHamcrest.Tests.Core.IsInstanceOfTests+ShaneLong";
            Assert.That(description.ToString(), Is.EqualTo(errorMessage));
        }
Exemplo n.º 4
0
        public void Describe_mismatch()
        {
            var simonChurch = new SimonChurch();
            var matcher     = Is.InstanceOf(typeof(ShaneLong));
            var description = new StringDescription();

            matcher.DescribeMismatch(simonChurch, description);

            const string errorMessage = "Simon Church is an instance of NHamcrest.Tests.Core.IsInstanceOfTests+SimonChurch not" +
                                        " NHamcrest.Tests.Core.IsInstanceOfTests+ShaneLong";

            Assert.That(description.ToString(), Is.EqualTo(errorMessage));
        }