Beispiel #1
0
        public void NotNullTest()
        {
            AssertPasses(Guid.NewGuid(), AGuid.NotNull());
            AssertPasses(Guid.Empty, AGuid.NotNull());

            AssertFails(null, AGuid.NotNull());
        }
Beispiel #2
0
        public void NotEqualToTest()
        {
            var guid = Guid.NewGuid();

            AssertPasses(guid, AGuid.NotEqualTo(Guid.NewGuid()));
            AssertPasses(guid, AGuid.NotEqualTo(Guid.Empty));
            AssertPasses(null, AGuid.NotEqualTo(Guid.NewGuid()));
            AssertPasses(guid, AGuid.NotEqualTo(null));

            AssertFails(null, AGuid.NotEqualTo(null));
            AssertFails(guid, AGuid.NotEqualTo(guid));
        }
Beispiel #3
0
        public void EqualToTest()
        {
            var guid = Guid.NewGuid();

            AssertPasses(guid, AGuid.EqualTo(guid));
            AssertPasses(Guid.Parse(guid.ToString()), AGuid.EqualTo(guid));
            AssertPasses(Guid.Empty, AGuid.EqualTo(Guid.Empty));

            AssertFails(null, AGuid.EqualTo(Guid.NewGuid()));
            AssertFails(Guid.NewGuid(), AGuid.EqualTo(Guid.NewGuid()));
            AssertFails(Guid.Empty, AGuid.EqualTo(Guid.NewGuid()));
        }
        public void InOrderAtLeastPrimitiveGuidItemsPass()
        {
            System.Collections.Generic.IEnumerable <Guid> list = new System.Collections.Generic.List <Guid> ();

            if (!typeof(System.Collections.Generic.IEnumerable <Guid>).IsInstanceOfType(list))
            {
                throw new ArgumentException("types don't match");
            }
            Guid g = Guid.NewGuid();

            AssertPasses(
                Items(g, Guid.NewGuid()),
                AList.InOrder().WithAtLeast(AGuid.EqualTo(g))
                );
        }
Beispiel #5
0
 public ANotification Id(Guid?val)
 {
     Id(AGuid.EqualTo(val));
     return(this);
 }
Beispiel #6
0
 public ANotificationQuery IdNull()
 {
     Id(AGuid.Null());
     return(this);
 }
Beispiel #7
0
 public ANotificationQuery Id(System.Guid?expect)
 {
     Id(AGuid.EqualTo(expect));
     return(this);
 }
Beispiel #8
0
 public ANotificationQuery AccountIdNull()
 {
     AccountId(AGuid.Null());
     return(this);
 }
Beispiel #9
0
 public ATestDto MyNullGuidPropNull()
 {
     MyNullGuidProp(AGuid.Null());
     return(this);
 }
Beispiel #10
0
 public ATestDto MyNullGuidProp(System.Guid?expect)
 {
     MyNullGuidProp(AGuid.EqualTo(expect));
     return(this);
 }
Beispiel #11
0
 public void NotEmptyTest()
 {
     AssertPasses(Guid.NewGuid(), AGuid.NotEmpty());
     AssertFails(Guid.Empty, AGuid.NotEmpty());
 }