123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using Supabase;
- using Supabase.Postgrest.Attributes;
- using Supabase.Postgrest.Models;
- using Supabase.Postgrest.Responses;
- using Supabase.Realtime;
- using System.ComponentModel;
- using System.Reflection;
- namespace TestProject1
- {
- [TestClass]
- public class UnitTest1
- {
- static string url = "https://mkrrkgiaewskfaslstgx.supabase.co";
- static string key = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1rcnJrZ2lhZXdza2Zhc2xzdGd4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjkxNjExMDYsImV4cCI6MjA0NDczNzEwNn0.G6-C-LDzQBTuNAOcE83gZIjWUTiDpYWYa1Rjp4M5Kx0";
- static Supabase.SupabaseOptions options = new Supabase.SupabaseOptions
- {
- AutoConnectRealtime = true
- };
- Supabase.Client supabase = new Supabase.Client(url, key, options);
- public async void Initialize()
- {
- await supabase.InitializeAsync();
- }
- public async Task<ModeledResponse<Label>> Get()
- {
- return await supabase.From<Label>().Get();
- }
- [TestMethod]
- public void TestLabels()
- {
- Initialize();
- Task<ModeledResponse<Label>> result = Get();
- result.Wait();
- var labels = result.Result.Models;
- Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsNotNull(labels);
- }
- }
- }
|