public void SimpleVmShouldGetReferenceToThisTest() { Id = Guid.NewGuid(); _loader.Get(_session, "ViewModel/" + nameof(TestSimpleVmWithDependency), new Dictionary <string, string>()); var vm = _session.ViewModel as TestSimpleVmWithDependency; Assert.NotNull(vm); Assert.Equal(Id, vm.Test.Id); }
public void Load_from_file_icon_png() { var name = $"icon_{Guid.NewGuid():N}.png"; _fileTest.CreateBinaryFile(name); var resource = _loader.Get(_session, name, new Dictionary <string, string>()); Assert.NotNull(resource); Assert.Equal("image/png", resource.ContentType); Assert.True(resource.IsBinary); Assert.Equal(16, resource.Data.Length); Assert.StartsWith("file://", resource.Source); }
private string LoadResourceText(string resourceName) { var resource = _loader.Get(new AppSession(), resourceName, new Dictionary <string, string>()); return(resource?.Text ?? LoadResourceText(_appAssembly, resourceName)); }
public void ProviderShouldGenerateStartComponent() { var resource = _loader.Get(_session, "start.js", new Dictionary <string, string>()); Assert.NotNull(resource); }