Beispiel #1
0
        public static IEnumerable <object[]> GetShouldCompareETagToSqlServerRowVersionParams()
        {
            var rowVersion = ETagConverter.ToSqlServerRowVersion("W/\"01\"");

            yield return(new object[] { "*", rowVersion, true });

            yield return(new object[] { "W/\"01\"", rowVersion, true });

            yield return(new object[] { "W/\"02\"", rowVersion, false });
        }
Beispiel #2
0
 public void ShouldConvertToSqlServerRowVersion(string etag, byte[] rowVersion)
 {
     ETagConverter.ToSqlServerRowVersion(etag).ShouldBe(rowVersion);
 }
Beispiel #3
0
 public void ConvertToSqlServerRowVersionShouldThrowOnMalformedEtag(string s)
 {
     Assert.Throws <FormatException>(() => ETagConverter.ToSqlServerRowVersion(s));
 }