예제 #1
0
        public void ShouldBeEqual()
        {
            var dateTime1 = new CypherDateTime(1947, 12, 17, 15, 12, 01, 789000000);
            var dateTime2 = new CypherDateTime(new DateTime(1947, 12, 17, 15, 12, 01, 789, DateTimeKind.Local));

            dateTime1.Equals(dateTime2).Should().BeTrue();
        }
예제 #2
0
        public void ShouldNotBeEqualToAnotherType()
        {
            var dateTime = new CypherDateTime(1947, 12, 17, 15, 12, 01, 789000000);
            var other    = "some string";

            dateTime.Equals(other).Should().BeFalse();
        }
예제 #3
0
        public void ShouldNotBeEqualToNull()
        {
            var dateTime = new CypherDateTime(1947, 12, 17, 15, 12, 01, 789000000);
            var other    = (object)null;

            dateTime.Equals(other).Should().BeFalse();
        }
예제 #4
0
        public void ShouldNotBeEqual()
        {
            var dateTime1 = new CypherDateTime(1947, 12, 17, 15, 12, 01, 789000000);
            var dateTime2 = new CypherDateTime(new DateTime(1947, 12, 17, 15, 12, 01, 788));

            dateTime1.Equals(dateTime2).Should().BeFalse();
        }