コード例 #1
0
        public void ShouldNotBeEqual()
        {
            var time1 = new CypherTime(12, 49, 55, 123000001);
            var time2 = new CypherTime(new DateTime(2017, 1, 1, 12, 49, 55, 123));
            var time3 = new CypherTime(new TimeSpan(0, 12, 49, 55, 125));
            var time4 = new CypherTime(46195123002000);

            time1.Equals(time2).Should().BeFalse();
            time1.Equals(time3).Should().BeFalse();
            time1.Equals(time4).Should().BeFalse();
        }
コード例 #2
0
        public void ShouldNotBeEqualToNull()
        {
            var time  = new CypherTime(12, 49, 55, 123000001);
            var other = (object)null;

            time.Equals(other).Should().BeFalse();
        }
コード例 #3
0
        public void ShouldNotBeEqualToAnotherType()
        {
            var time  = new CypherTime(12, 49, 55, 123000001);
            var other = "some string";

            time.Equals(other).Should().BeFalse();
        }