예제 #1
0
        public void should_return_true()
        {
            Sample  standard = new Sample();
            Sample  sample   = new Sample();
            Another another  = new Another();

            Assert.IsTrue(this.compare.areEquals(standard, sample));
            Assert.IsTrue(this.compare.areEquals(sample, another));
            Assert.IsTrue(this.compare.areEquals(standard, another));
        }
예제 #2
0
        public void should_copy_just_same_fields()
        {
            Sample  one     = this.makeSample();
            Another another = new Another();

            this.command.setSource(one);
            this.command.setDestination(another);
            this.command.execute();

            Assert.AreEqual(another.name, one.name);
            Assert.AreEqual(0, another.Id);
            Assert.IsFalse(another.isEnabled);
        }
예제 #3
0
        public void should_return_false()
        {
            Sample standard = new Sample()
            {
                name = "jack"
            };
            Sample  sample  = new Sample();
            Another another = new Another()
            {
                name = "john"
            };

            Assert.IsFalse(this.compare.areEquals(standard, sample));
            Assert.IsFalse(this.compare.areEquals(another, sample));
            Assert.IsFalse(this.compare.areEquals(another, standard));
        }