-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from pyrocumulus/factory-coverage
Improve factory code coverage, improved interface structure for the object and reader factories and removed dead code. Further enhanced code coverage with more unit tests.
- Loading branch information
Showing
22 changed files
with
135 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace PVOutput.Net.Objects.Core | ||
{ | ||
internal interface IArrayStringFactory<TObjectType> : IObjectStringFactory<TObjectType> | ||
{ | ||
IArrayStringReader<TObjectType> CreateArrayReader(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/PVOutput.Net/Objects/Factories/AggregatedOutputFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
using PVOutput.Net.Objects.Core; | ||
using System; | ||
using PVOutput.Net.Objects.Core; | ||
using PVOutput.Net.Objects.Modules.Readers; | ||
|
||
namespace PVOutput.Net.Objects.Factories | ||
{ | ||
internal class DayStatisticsFactory : IStringFactory<IDayStatistics> | ||
internal class DayStatisticsFactory : IObjectStringFactory<IDayStatistics> | ||
{ | ||
public IArrayStringReader<IDayStatistics> CreateArrayReader() => new CharacterDelimitedArrayStringReader<IDayStatistics>(); | ||
|
||
public IObjectStringReader<IDayStatistics> CreateObjectReader() => new DayStatisticsObjectStringReader(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
using System; | ||
using System; | ||
using PVOutput.Net.Objects.Core; | ||
using PVOutput.Net.Objects.Modules; | ||
using PVOutput.Net.Objects.Modules.Readers; | ||
|
||
namespace PVOutput.Net.Objects.Factories | ||
{ | ||
internal class MissingFactory : IStringFactory<IMissing> | ||
internal class MissingFactory : IObjectStringFactory<IMissing> | ||
{ | ||
public IArrayStringReader<IMissing> CreateArrayReader() => throw new NotImplementedException(); | ||
|
||
public IObjectStringReader<IMissing> CreateObjectReader() => new MissingObjectStringReader(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
using PVOutput.Net.Objects.Core; | ||
using PVOutput.Net.Objects.Core; | ||
using PVOutput.Net.Objects.Modules; | ||
using PVOutput.Net.Objects.Modules.Readers; | ||
|
||
namespace PVOutput.Net.Objects.Factories | ||
{ | ||
internal class StatisticFactory : IStringFactory<IStatistic> | ||
internal class StatisticFactory : IObjectStringFactory<IStatistic> | ||
{ | ||
public IArrayStringReader<IStatistic> CreateArrayReader() => new CharacterDelimitedArrayStringReader<IStatistic>(); | ||
|
||
public IObjectStringReader<IStatistic> CreateObjectReader() => new StatisticObjectStringReader(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
using PVOutput.Net.Objects.Core; | ||
using PVOutput.Net.Objects.Core; | ||
using PVOutput.Net.Objects.Modules; | ||
using PVOutput.Net.Objects.Modules.Readers; | ||
|
||
namespace PVOutput.Net.Objects.Factories | ||
{ | ||
internal class SystemFactory : IStringFactory<ISystem> | ||
internal class SystemFactory : IObjectStringFactory<ISystem> | ||
{ | ||
public IArrayStringReader<ISystem> CreateArrayReader() => new CharacterDelimitedArrayStringReader<ISystem>(); | ||
|
||
public IObjectStringReader<ISystem> CreateObjectReader() => new SystemObjectStringReader(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.