Skip to content

Commit

Permalink
Merge pull request #67 from EdCharbeneau/issue-62
Browse files Browse the repository at this point in the history
  • Loading branch information
EdCharbeneau authored Nov 10, 2021
2 parents ba79388 + 73ae267 commit 6f64d06
Show file tree
Hide file tree
Showing 56 changed files with 20,808 additions and 130 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Threading.Tasks;
using TestComponents;

namespace BlazorSize.ExampleNet5.Data
namespace BlazorSize.ExampleNet6.Data
{
public class WeatherForecastService : IWeatherForecastService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using BlazorPro.BlazorSize;
using BlazorSize.ExampleNet5.Data;
using BlazorSize.ExampleNet6.Data;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -11,7 +11,7 @@
using System.Threading.Tasks;
using TestComponents;

namespace BlazorSize.ExampleNet5
namespace BlazorSize.ExampleNet6
{
public class Program
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">BlazorSize.ExampleNet5</a>
<a class="navbar-brand" href="">BlazorSize.ExampleNet6</a>
<button class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.AspNetCore.Components.WebAssembly.Http
@using Microsoft.JSInterop
@using BlazorSize.ExampleNet5
@using BlazorSize.ExampleNet5.Shared
@using BlazorSize.ExampleNet6
@using BlazorSize.ExampleNet6.Shared
@using BlazorSize.ExampleNet6.Data
@using BlazorPro.BlazorSize
@using BlazorSize.ExampleNet5.Data
@using TestComponents
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>BlazorSize.ExampleNet5</title>
<title>BlazorSize.ExampleNet6</title>
<base href="/" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/app.css" rel="stylesheet" />
<link href="BlazorSize.ExampleNet5.styles.css" rel="stylesheet" />
<link href="BlazorSize.ExampleNet6.styles.css" rel="stylesheet" />
<!-- The following JavaScript can be removed thru JS Isolation -->
</head>

Expand Down
45 changes: 45 additions & 0 deletions BlazorSize.UnitTesting/BlazorPro.BlazorSize.UnitTesting.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<LangVersion>latest</LangVersion>
<Version>6.0.0</Version>
<Authors>Ed Charbeneau</Authors>
<Company>EdCharbeneau.com</Company>
<Description>A testing library to provide helper extensions for BlazorSize.</Description>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageProjectUrl>https://github.com/EdCharbeneau/BlazorSize</PackageProjectUrl>
<PackageIcon>blazor-glove-128.jpg</PackageIcon>
<PackageIconUrl />
<RepositoryUrl>https://github.com/EdCharbeneau/BlazorSize</RepositoryUrl>
<PackageTags>Blazor, JavaScript Interop</PackageTags>
<PackageReleaseNotes>
6.0.0 Added support for bUnit.
</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<!-- Package Logo -->
<None Include="..\_resources\blazor-glove-128.jpg">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<!-- Package license file -->
<None Include="LICENSE.txt">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="bunit.core" Version="1.3.42" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BlazorSize\BlazorPro.BlazorSize.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using BlazorPro.BlazorSize;
using Bunit;
using BlazorPro.BlazorSize;
using Microsoft.JSInterop;

namespace Bunit
{
public class FakeMediaQueryService : IMediaQueryService
{
private readonly TestContextBase contextBase;
private MediaQueryArgs? activeMediaQuery = null;
private MediaQueryArgs activeMediaQuery = null!;

public List<MediaQueryCache> MediaQueries { get; } = new();

Expand Down Expand Up @@ -65,8 +62,7 @@ public void SetActiveBreakPoint(string breakpoint)

public void SetActiveMediaQuery(MediaQueryArgs args)
{
if (args is null)
return;
if (args.Media == null) return;

activeMediaQuery = args;

Expand All @@ -86,7 +82,7 @@ public void SetActiveMediaQuery(MediaQueryArgs args)
});
}

private MediaQueryCache GetMediaQueryFromCache(string byMedia)
private MediaQueryCache? GetMediaQueryFromCache(string byMedia)
=> MediaQueries?.Find(q => q.MediaRequested == byMedia);
}
}
6 changes: 6 additions & 0 deletions BlazorSize.UnitTesting/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Copyright 2019 Ed Charbeneau

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Binary file not shown.
Loading

0 comments on commit 6f64d06

Please sign in to comment.