public void With_valid_arguments_doesnt_throw() { var set = new InternalDbSet <FakeEntity>(new Mock <InternalSetForMock <FakeEntity> >().Object); var query = set.SqlQuery("query"); Assert.NotNull(query); Assert.False(query.InternalQuery.Streaming); }
public void With_null_SQL_string_throws() { var set = new InternalDbSet <FakeEntity>(new Mock <InternalSetForMock <FakeEntity> >().Object); Assert.Equal(Strings.ArgumentIsNullOrWhitespace("sql"), Assert.Throws <ArgumentException>(() => set.SqlQuery(null)).Message); }
public void With_null_parameters_throws() { var set = new InternalDbSet <FakeEntity>(new Mock <InternalSetForMock <FakeEntity> >().Object); Assert.Equal("parameters", Assert.Throws <ArgumentNullException>(() => set.SqlQuery("query", null)).ParamName); }
public void Passing_null_parameters_to_non_generic_entity_query_method_throws() { var set = new InternalDbSet<FakeEntity>(new Mock<InternalSetForMock<FakeEntity>>().Object); Assert.Equal("parameters", Assert.Throws<ArgumentNullException>(() => set.SqlQuery("query", null)).ParamName); }
public void Passing_whitespace_SQL_string_to_non_generic_entity_query_method_throws() { var set = new InternalDbSet<FakeEntity>(new Mock<InternalSetForMock<FakeEntity>>().Object); Assert.Equal(Strings.ArgumentIsNullOrWhitespace("sql"), Assert.Throws<ArgumentException>(() => set.SqlQuery(" ")).Message); }
public void With_valid_arguments_doesnt_throw() { var set = new InternalDbSet<FakeEntity>(new Mock<InternalSetForMock<FakeEntity>>().Object); Assert.NotNull(set.SqlQuery("query")); }
public void With_null_SQL_string_throws() { var set = new InternalDbSet<FakeEntity>(new Mock<InternalSetForMock<FakeEntity>>().Object); Assert.Equal(Strings.ArgumentIsNullOrWhitespace("sql"), Assert.Throws<ArgumentException>(() => set.SqlQuery(null)).Message); }
public void With_valid_arguments_doesnt_throw() { var set = new InternalDbSet <FakeEntity>(new Mock <InternalSetForMock <FakeEntity> >().Object); Assert.NotNull(set.SqlQuery("query")); }