Exemplo n.º 1
0
            public void GoodDetail_ReturnsExpectedValue()
            {
                // arrange
                StubAuditableEntity fakeEntity = MakeEntity();
                DateTime            expected   = new DateTime(2017, 6, 15, 14, 15, 0, DateTimeKind.Utc);

                // act

                // assert
                fakeEntity.CreatedUtc
                .Should()
                .Be(expected);
            }
Exemplo n.º 2
0
            public void InitalizedDetail_HasDefaultValue()
            {
                // arrange
                StubAuditableEntity test     = new StubAuditableEntity();
                DateTime            expected = DateTime.MinValue;

                // act

                // assert
                test.CreatedUtc
                .Should()
                .Be(expected);
            }
Exemplo n.º 3
0
            public void InitializedDetail_HeadDefaultDateTimeKind()
            {
                // arrange
                StubAuditableEntity test     = new StubAuditableEntity();
                DateTimeKind        expected = DateTimeKind.Unspecified;

                // act

                // assert
                test.CreatedUtc
                .Kind
                .Should()
                .Be(expected);
            }
Exemplo n.º 4
0
            public void GoodDetail_ReturnsExpectedDateTimeKind()
            {
                // arrange
                StubAuditableEntity fakeEntity = MakeEntity();
                DateTimeKind        expected   = DateTimeKind.Utc;

                // act

                // assert
                fakeEntity.CreatedUtc
                .Kind
                .Should()
                .Be(expected);
            }
Exemplo n.º 5
0
            public void LocalTime_ReturnsExpectedDateTimeKind()
            {
                // arrange
                StubAuditableEntity test = new StubAuditableEntity();

                test.CreatedUtc = new DateTime(2017, 7, 26, 10, 17, 0, DateTimeKind.Local);
                DateTimeKind expected = DateTimeKind.Utc;

                // act
                DateTimeKind results = test.CreatedUtc.Kind;

                // assert
                results.Should()
                .Be(expected);
            }