PageRenderTime 60ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/tests/MongoDB.Bson.TestHelpers/BsonAssertionExtensions.cs

http://github.com/mongodb/mongo-csharp-driver
C# | 39 lines | 20 code | 4 blank | 15 comment | 0 complexity | e36ddece6af0457ec3f5a272c01d1896 MD5 | raw file
Possible License(s): Apache-2.0
  1. /* Copyright 2010-present MongoDB Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. using MongoDB.Bson;
  16. using MongoDB.Bson.TestHelpers;
  17. namespace FluentAssertions // use FluentAssertions namespace so that these extension methods are automatically available
  18. {
  19. public static class BsonAssertionExtensions
  20. {
  21. // static methods
  22. public static BsonArrayAssertions Should(this BsonArray actualValue)
  23. {
  24. return new BsonArrayAssertions(actualValue);
  25. }
  26. public static BsonDocumentAssertions Should(this BsonDocument actualValue)
  27. {
  28. return new BsonDocumentAssertions(actualValue);
  29. }
  30. public static BsonValueAssertions Should(this BsonValue actualValue)
  31. {
  32. return new BsonValueAssertions(actualValue);
  33. }
  34. }
  35. }