Giter Club home page Giter Club logo

nwn.masterlist's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar milliorn avatar urothis avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

nwn.masterlist's Issues

GetAllNwSyncManifestHash

public async static Task<IOrderedEnumerable<NwServer>> GetAllNwSyncManifestHash(this Client client)
{
    return ((IOrderedEnumerable<NwServer>)(await client.GetServers()).Select(x => x.NwSync.Manifests.Where(y => y.Hash != string.Empty))).OrderBy(x => x.ModuleName);
}
[Fact]
public async void TestGetAllNwSyncManifestHash()
{
    var collection = await new MasterList.Client().GetAllNwSyncManifestHash();
  
    foreach (var item in collection)
    {
        //output.WriteLine($"{item.ModuleName} -> {item.NwSync.Manifests}");
    }
  
    Assert.NotEmpty(collection);
    Assert.NotNull(collection);
}

NWN.MasterList.Test.Client.TestGetAllNwSyncManifestHash:
Outcome: Failed
Error Message:
System.InvalidCastException : Unable to cast object of type 'SelectListIterator2[NWN.MasterList.Data.NwServer,System.Collections.Generic.IEnumerable1[NWN.MasterList.Data.Manifest]]' to type 'System.Linq.IOrderedEnumerable`1[NWN.MasterList.Data.NwServer]'.
Stack Trace:
at NWN.MasterList.Helper.GetAllNwSyncManifestHash(Client client) in c:\Users\scott\Desktop\NWN.MasterList-1\API\src\Helper.cs:line 115
at NWN.MasterList.Test.Client.TestGetAllNwSyncManifestHash() in c:\Users\scott\Desktop\NWN.MasterList-1\Test\src\Client.Test.cs:line 397
at System.Threading.Tasks.Task.<>c.b__140_0(Object state)

Total tests: 1. Passed: 0. Failed: 1. Skipped: 0

Code Format

Enforce uniform formatting of code when pushed up via PR, etc. Allow code format to be what the user wants at a local level.

NWN.MasterList.Test.Client.TestGetAllElcByType

https://github.com/milliorn/NWN.MasterList-1/blob/214a37ab8ebf04fd891da46ab8f082304c3f47ec/API/src/Helper.cs#L37-L37

NWN.MasterList.Test.Client.TestGetAllElcByType:
Outcome: Failed
Error Message:
System.InvalidCastException : Unable to cast object of type 'SelectIPartitionIterator2[NWN.MasterList.Data.NwServer,System.Boolean]' to type 'System.Linq.IOrderedEnumerable1[NWN.MasterList.Data.NwServer]'.
Stack Trace:
at NWN.MasterList.Helper.GetAllElcByType(Client client, Boolean setting) in c:\Users\scott\Desktop\NWN.MasterList-1\API\src\Helper.cs:line 41
at NWN.MasterList.Test.Client.TestGetAllElcByType() in c:\Users\scott\Desktop\NWN.MasterList-1\Test\src\Client.Test.cs:line 97
at System.Threading.Tasks.Task.<>c.b__140_0(Object state)

public async static Task<IOrderedEnumerable<NwServer>> GetAllElc(this Client client) =>
	(await client.GetServers()).OrderBy(x => x.ELC).ThenBy(x => x.ModuleName);

  // TODO #17
public async static Task<IOrderedEnumerable<NwServer>> GetAllElcByType(this Client client, bool setting)
{
	var response = await client.GetAllElc();
	return (IOrderedEnumerable<NwServer>)response.Select(x => x.Equals(setting));
}
[Fact]
public async void TestGetAllElcByType()
{
    var collection = await new MasterList.Client().GetAllElcByType(false);

    foreach (var item in collection)
    {
        output.WriteLine($"{item.ModuleName} -> ELC:{item.ELC}");
    }

    Assert.NotEmpty(collection);
    Assert.NotNull(collection);
}

There is an issue with GetAllElcByType function and how I am casting (IOrderedEnumerable<NwServer> result in the return.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.