Beispiel #1
0
    public void TryGetBookPropertyWithInvalidField()
    {
        string isbn  = "978-1779501127";
        string field = "potato";

        Challenge1.GetBookProperty(isbn, field);
    }
Beispiel #2
0
    public void TryGetBookPropertyWithInvalidISBN()
    {
        string isbn  = "978-1617298028"; // Code Like A Pro in C# (Manning Publications, 2021) - Jort Rodenburg
        string field = "title";

        Challenge1.GetBookProperty(isbn, field);
    }
Beispiel #3
0
    public void TryGetBookPropertyWithEmptyISBN()
    {
        string isbn  = string.Empty;
        string field = "title";

        Challenge1.GetBookProperty(isbn, field);
    }
Beispiel #4
0
    public void TryGetBookPropertyWithValidISBN()
    {
        string isbn   = "978-1779501127";
        string field  = "title";
        string result = Challenge1.GetBookProperty(isbn, field);

        Assert.AreEqual("Watchmen", result);
    }