www_ut.cpp 557 B

12345678910111213141516171819
  1. #include <library/cpp/testing/unittest/registar.h>
  2. #include <library/cpp/resource/resource.h>
  3. Y_UNIT_TEST_SUITE(Www) {
  4. Y_UNIT_TEST(messagebus_js) {
  5. auto str = NResource::Find("/messagebus.js");
  6. UNIT_ASSERT(str.Contains("logTransform"));
  7. UNIT_ASSERT(str.Contains("plotHist"));
  8. }
  9. Y_UNIT_TEST(busico_png) {
  10. auto str = NResource::Find("/bus-ico.png");
  11. UNIT_ASSERT(str.Contains("PNG")); //header
  12. }
  13. Y_UNIT_TEST(not_exist) {
  14. UNIT_ASSERT_EXCEPTION(NResource::Find("/not_exist"), yexception);
  15. }
  16. }